From 3206e4634925fe529886efcc9a7a662d6e28c703 Mon Sep 17 00:00:00 2001 From: paulwer Date: Mon, 18 Dec 2023 19:37:13 +0100 Subject: [PATCH 01/92] initial changings --- _ide_helper_custom.php | 5 + app/DataMapper/CompanySettings.php | 561 ++++---- app/DataMapper/Settings/SettingsData.php | 24 +- app/Jobs/Mail/NinjaMailerJob.php | 117 +- app/Providers/AppServiceProvider.php | 22 +- app/Services/Email/AdminEmail.php | 136 +- app/Services/Email/Email.php | 172 ++- composer.json | 3 +- composer.lock | 73 +- config/mail.php | 6 +- config/services.php | 13 +- lang/en/texts.php | 607 ++++---- .../components/schemas/company_settings.yaml | 1264 ++++++++--------- 13 files changed, 1623 insertions(+), 1380 deletions(-) diff --git a/_ide_helper_custom.php b/_ide_helper_custom.php index bfe7b673dd79..747187a2d147 100644 --- a/_ide_helper_custom.php +++ b/_ide_helper_custom.php @@ -13,5 +13,10 @@ namespace Illuminate\Contracts\Mail { return true; } + + public function brevo_config(string $key) + { + return true; + } } } diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 4c63369c3379..855188dad49e 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -26,7 +26,7 @@ class CompanySettings extends BaseSettings public $auto_archive_invoice = false; // @implemented public $qr_iban = ''; //@implemented - + public $besr_id = ''; //@implemented public $lock_invoices = 'off'; //off,when_sent,when_paid //@implemented @@ -229,7 +229,7 @@ class CompanySettings extends BaseSettings public $require_quote_signature = false; //@TODO ben to confirm //email settings - public $email_sending_method = 'default'; //enum 'default','gmail','office365' 'client_postmark', 'client_mailgun' //@implemented + public $email_sending_method = 'default'; //enum 'default','gmail','office365' 'client_postmark', 'client_mailgun' , 'client_brevo' //@implemented public $gmail_sending_user_id = '0'; //@implemented @@ -444,13 +444,19 @@ class CompanySettings extends BaseSettings public $postmark_secret = ''; public $custom_sending_email = ''; - + public $mailgun_secret = ''; - + public $mailgun_domain = ''; public $mailgun_endpoint = 'api.mailgun.net'; //api.eu.mailgun.net + public $brevo_secret = ''; + + public $brevo_domain = ''; + + public $brevo_endpoint = 'api.mailgun.net'; //api.eu.mailgun.net + public $auto_bill_standard_invoices = false; public $email_alignment = 'center'; // center , left, right @@ -482,9 +488,9 @@ class CompanySettings extends BaseSettings public $enable_e_invoice = false; public $delivery_note_design_id = ''; - + public $statement_design_id = ''; - + public $payment_receipt_design_id = ''; public $payment_refund_design_id = ''; @@ -494,279 +500,282 @@ class CompanySettings extends BaseSettings public $payment_email_all_contacts = false; public static $casts = [ - 'payment_email_all_contacts' => 'bool', - 'statement_design_id' => 'string', - 'delivery_note_design_id' => 'string', - 'payment_receipt_design_id' => 'string', - 'payment_refund_design_id' => 'string', - 'classification' => 'string', - 'enable_e_invoice' => 'bool', - 'classification' => 'string', - 'default_expense_payment_type_id' => 'string', - 'e_invoice_type' => 'string', - 'mailgun_endpoint' => 'string', - 'client_initiated_payments' => 'bool', - 'client_initiated_payments_minimum' => 'float', - 'sync_invoice_quote_columns' => 'bool', - 'show_task_item_description' => 'bool', - 'allow_billable_task_items' => 'bool', + 'payment_email_all_contacts' => 'bool', + 'statement_design_id' => 'string', + 'delivery_note_design_id' => 'string', + 'payment_receipt_design_id' => 'string', + 'payment_refund_design_id' => 'string', + 'classification' => 'string', + 'enable_e_invoice' => 'bool', + 'classification' => 'string', + 'default_expense_payment_type_id' => 'string', + 'e_invoice_type' => 'string', + 'mailgun_endpoint' => 'string', + 'brevo_endpoint' => 'string', + 'client_initiated_payments' => 'bool', + 'client_initiated_payments_minimum' => 'float', + 'sync_invoice_quote_columns' => 'bool', + 'show_task_item_description' => 'bool', + 'allow_billable_task_items' => 'bool', 'accept_client_input_quote_approval' => 'bool', - 'custom_sending_email' => 'string', - 'show_paid_stamp' => 'bool', - 'show_shipping_address' => 'bool', - 'company_logo_size' => 'string', - 'show_email_footer' => 'bool', - 'email_alignment' => 'string', - 'auto_bill_standard_invoices' => 'bool', - 'postmark_secret' => 'string', - 'mailgun_secret' => 'string', - 'mailgun_domain' => 'string', - 'send_email_on_mark_paid' => 'bool', - 'vendor_portal_enable_uploads' => 'bool', - 'besr_id' => 'string', - 'qr_iban' => 'string', - 'email_subject_purchase_order' => 'string', - 'email_template_purchase_order' => 'string', - 'require_purchase_order_signature' => 'bool', - 'purchase_order_public_notes' => 'string', - 'purchase_order_terms' => 'string', - 'purchase_order_design_id' => 'string', - 'purchase_order_footer' => 'string', - 'purchase_order_number_pattern' => 'string', - 'page_numbering_alignment' => 'string', - 'page_numbering' => 'bool', - 'auto_archive_invoice_cancelled' => 'bool', - 'email_from_name' => 'string', - 'show_all_tasks_client_portal' => 'string', - 'entity_send_time' => 'int', - 'shared_invoice_credit_counter' => 'bool', - 'reply_to_name' => 'string', - 'hide_empty_columns_on_pdf' => 'bool', - 'enable_reminder_endless' => 'bool', - 'use_credits_payment' => 'string', - 'recurring_invoice_number_pattern' => 'string', - 'recurring_invoice_number_counter' => 'int', - 'client_portal_under_payment_minimum'=> 'float', - 'auto_bill_date' => 'string', - 'primary_color' => 'string', - 'secondary_color' => 'string', - 'client_portal_allow_under_payment' => 'bool', - 'client_portal_allow_over_payment' => 'bool', - 'auto_bill' => 'string', - 'lock_invoices' => 'string', - 'client_portal_terms' => 'string', - 'client_portal_privacy_policy' => 'string', - 'client_can_register' => 'bool', - 'portal_design_id' => 'string', - 'late_fee_endless_percent' => 'float', - 'late_fee_endless_amount' => 'float', - 'auto_email_invoice' => 'bool', - 'reminder_send_time' => 'int', - 'email_sending_method' => 'string', - 'gmail_sending_user_id' => 'string', - 'counter_number_applied' => 'string', - 'quote_number_applied' => 'string', - 'email_subject_custom1' => 'string', - 'email_subject_custom2' => 'string', - 'email_subject_custom3' => 'string', - 'email_template_custom1' => 'string', - 'email_template_custom2' => 'string', - 'email_template_custom3' => 'string', - 'enable_reminder1' => 'bool', - 'enable_reminder2' => 'bool', - 'enable_reminder3' => 'bool', - 'num_days_reminder1' => 'int', - 'num_days_reminder2' => 'int', - 'num_days_reminder3' => 'int', - 'schedule_reminder1' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) - 'schedule_reminder2' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) - 'schedule_reminder3' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) - 'late_fee_amount1' => 'float', - 'late_fee_amount2' => 'float', - 'late_fee_amount3' => 'float', - 'late_fee_percent1' => 'float', - 'late_fee_percent2' => 'float', - 'late_fee_percent3' => 'float', - 'endless_reminder_frequency_id' => 'integer', + 'custom_sending_email' => 'string', + 'show_paid_stamp' => 'bool', + 'show_shipping_address' => 'bool', + 'company_logo_size' => 'string', + 'show_email_footer' => 'bool', + 'email_alignment' => 'string', + 'auto_bill_standard_invoices' => 'bool', + 'postmark_secret' => 'string', + 'mailgun_secret' => 'string', + 'mailgun_domain' => 'string', + 'brevo_secret' => 'string', + 'brevo_domain' => 'string', + 'send_email_on_mark_paid' => 'bool', + 'vendor_portal_enable_uploads' => 'bool', + 'besr_id' => 'string', + 'qr_iban' => 'string', + 'email_subject_purchase_order' => 'string', + 'email_template_purchase_order' => 'string', + 'require_purchase_order_signature' => 'bool', + 'purchase_order_public_notes' => 'string', + 'purchase_order_terms' => 'string', + 'purchase_order_design_id' => 'string', + 'purchase_order_footer' => 'string', + 'purchase_order_number_pattern' => 'string', + 'page_numbering_alignment' => 'string', + 'page_numbering' => 'bool', + 'auto_archive_invoice_cancelled' => 'bool', + 'email_from_name' => 'string', + 'show_all_tasks_client_portal' => 'string', + 'entity_send_time' => 'int', + 'shared_invoice_credit_counter' => 'bool', + 'reply_to_name' => 'string', + 'hide_empty_columns_on_pdf' => 'bool', + 'enable_reminder_endless' => 'bool', + 'use_credits_payment' => 'string', + 'recurring_invoice_number_pattern' => 'string', + 'recurring_invoice_number_counter' => 'int', + 'client_portal_under_payment_minimum' => 'float', + 'auto_bill_date' => 'string', + 'primary_color' => 'string', + 'secondary_color' => 'string', + 'client_portal_allow_under_payment' => 'bool', + 'client_portal_allow_over_payment' => 'bool', + 'auto_bill' => 'string', + 'lock_invoices' => 'string', + 'client_portal_terms' => 'string', + 'client_portal_privacy_policy' => 'string', + 'client_can_register' => 'bool', + 'portal_design_id' => 'string', + 'late_fee_endless_percent' => 'float', + 'late_fee_endless_amount' => 'float', + 'auto_email_invoice' => 'bool', + 'reminder_send_time' => 'int', + 'email_sending_method' => 'string', + 'gmail_sending_user_id' => 'string', + 'counter_number_applied' => 'string', + 'quote_number_applied' => 'string', + 'email_subject_custom1' => 'string', + 'email_subject_custom2' => 'string', + 'email_subject_custom3' => 'string', + 'email_template_custom1' => 'string', + 'email_template_custom2' => 'string', + 'email_template_custom3' => 'string', + 'enable_reminder1' => 'bool', + 'enable_reminder2' => 'bool', + 'enable_reminder3' => 'bool', + 'num_days_reminder1' => 'int', + 'num_days_reminder2' => 'int', + 'num_days_reminder3' => 'int', + 'schedule_reminder1' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) + 'schedule_reminder2' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) + 'schedule_reminder3' => 'string', // (enum: after_invoice_date, before_due_date, after_due_date) + 'late_fee_amount1' => 'float', + 'late_fee_amount2' => 'float', + 'late_fee_amount3' => 'float', + 'late_fee_percent1' => 'float', + 'late_fee_percent2' => 'float', + 'late_fee_percent3' => 'float', + 'endless_reminder_frequency_id' => 'integer', 'client_online_payment_notification' => 'bool', 'client_manual_payment_notification' => 'bool', - 'document_email_attachment' => 'bool', - 'enable_client_portal_password' => 'bool', - 'enable_email_markup' => 'bool', - 'enable_client_portal_dashboard' => 'bool', - 'enable_client_portal' => 'bool', - 'email_template_statement' => 'string', - 'email_subject_statement' => 'string', - 'signature_on_pdf' => 'bool', - 'quote_footer' => 'string', - 'page_size' => 'string', - 'page_layout' => 'string', - 'font_size' => 'int', - 'primary_font' => 'string', - 'secondary_font' => 'string', - 'hide_paid_to_date' => 'bool', - 'embed_documents' => 'bool', - 'all_pages_header' => 'bool', - 'all_pages_footer' => 'bool', - 'project_number_pattern' => 'string', - 'project_number_counter' => 'int', - 'task_number_pattern' => 'string', - 'task_number_counter' => 'int', - 'expense_number_pattern' => 'string', - 'expense_number_counter' => 'int', - 'recurring_expense_number_pattern' => 'string', - 'recurring_expense_number_counter' => 'int', - 'recurring_quote_number_pattern' => 'string', - 'recurring_quote_number_counter' => 'int', - 'vendor_number_pattern' => 'string', - 'vendor_number_counter' => 'int', - 'ticket_number_pattern' => 'string', - 'ticket_number_counter' => 'int', - 'payment_number_pattern' => 'string', - 'payment_number_counter' => 'int', - 'reply_to_email' => 'string', - 'bcc_email' => 'string', - 'pdf_email_attachment' => 'bool', - 'ubl_email_attachment' => 'bool', - 'email_style' => 'string', - 'email_style_custom' => 'string', - 'company_gateway_ids' => 'string', - 'address1' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'company_logo' => 'string', - 'country_id' => 'string', - 'client_number_pattern' => 'string', - 'client_number_counter' => 'integer', - 'credit_number_pattern' => 'string', - 'credit_number_counter' => 'integer', - 'currency_id' => 'string', - 'custom_value1' => 'string', - 'custom_value2' => 'string', - 'custom_value3' => 'string', - 'custom_value4' => 'string', - 'custom_message_dashboard' => 'string', - 'custom_message_unpaid_invoice' => 'string', - 'custom_message_paid_invoice' => 'string', - 'custom_message_unapproved_quote' => 'string', - 'default_task_rate' => 'float', - 'email_signature' => 'string', - 'email_subject_invoice' => 'string', - 'email_subject_quote' => 'string', - 'email_subject_credit' => 'string', - 'email_subject_payment' => 'string', - 'email_subject_payment_partial' => 'string', - 'email_template_invoice' => 'string', - 'email_template_quote' => 'string', - 'email_template_credit' => 'string', - 'email_template_payment' => 'string', - 'email_template_payment_partial' => 'string', - 'email_subject_reminder1' => 'string', - 'email_subject_reminder2' => 'string', - 'email_subject_reminder3' => 'string', - 'email_subject_reminder_endless' => 'string', - 'email_template_reminder1' => 'string', - 'email_template_reminder2' => 'string', - 'email_template_reminder3' => 'string', - 'email_template_reminder_endless' => 'string', - 'inclusive_taxes' => 'bool', - 'invoice_number_pattern' => 'string', - 'invoice_number_counter' => 'integer', - 'invoice_design_id' => 'string', + 'document_email_attachment' => 'bool', + 'enable_client_portal_password' => 'bool', + 'enable_email_markup' => 'bool', + 'enable_client_portal_dashboard' => 'bool', + 'enable_client_portal' => 'bool', + 'email_template_statement' => 'string', + 'email_subject_statement' => 'string', + 'signature_on_pdf' => 'bool', + 'quote_footer' => 'string', + 'page_size' => 'string', + 'page_layout' => 'string', + 'font_size' => 'int', + 'primary_font' => 'string', + 'secondary_font' => 'string', + 'hide_paid_to_date' => 'bool', + 'embed_documents' => 'bool', + 'all_pages_header' => 'bool', + 'all_pages_footer' => 'bool', + 'project_number_pattern' => 'string', + 'project_number_counter' => 'int', + 'task_number_pattern' => 'string', + 'task_number_counter' => 'int', + 'expense_number_pattern' => 'string', + 'expense_number_counter' => 'int', + 'recurring_expense_number_pattern' => 'string', + 'recurring_expense_number_counter' => 'int', + 'recurring_quote_number_pattern' => 'string', + 'recurring_quote_number_counter' => 'int', + 'vendor_number_pattern' => 'string', + 'vendor_number_counter' => 'int', + 'ticket_number_pattern' => 'string', + 'ticket_number_counter' => 'int', + 'payment_number_pattern' => 'string', + 'payment_number_counter' => 'int', + 'reply_to_email' => 'string', + 'bcc_email' => 'string', + 'pdf_email_attachment' => 'bool', + 'ubl_email_attachment' => 'bool', + 'email_style' => 'string', + 'email_style_custom' => 'string', + 'company_gateway_ids' => 'string', + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'company_logo' => 'string', + 'country_id' => 'string', + 'client_number_pattern' => 'string', + 'client_number_counter' => 'integer', + 'credit_number_pattern' => 'string', + 'credit_number_counter' => 'integer', + 'currency_id' => 'string', + 'custom_value1' => 'string', + 'custom_value2' => 'string', + 'custom_value3' => 'string', + 'custom_value4' => 'string', + 'custom_message_dashboard' => 'string', + 'custom_message_unpaid_invoice' => 'string', + 'custom_message_paid_invoice' => 'string', + 'custom_message_unapproved_quote' => 'string', + 'default_task_rate' => 'float', + 'email_signature' => 'string', + 'email_subject_invoice' => 'string', + 'email_subject_quote' => 'string', + 'email_subject_credit' => 'string', + 'email_subject_payment' => 'string', + 'email_subject_payment_partial' => 'string', + 'email_template_invoice' => 'string', + 'email_template_quote' => 'string', + 'email_template_credit' => 'string', + 'email_template_payment' => 'string', + 'email_template_payment_partial' => 'string', + 'email_subject_reminder1' => 'string', + 'email_subject_reminder2' => 'string', + 'email_subject_reminder3' => 'string', + 'email_subject_reminder_endless' => 'string', + 'email_template_reminder1' => 'string', + 'email_template_reminder2' => 'string', + 'email_template_reminder3' => 'string', + 'email_template_reminder_endless' => 'string', + 'inclusive_taxes' => 'bool', + 'invoice_number_pattern' => 'string', + 'invoice_number_counter' => 'integer', + 'invoice_design_id' => 'string', // 'invoice_fields' => 'string', - 'invoice_taxes' => 'int', + 'invoice_taxes' => 'int', //'enabled_item_tax_rates' => 'int', - 'invoice_footer' => 'string', - 'invoice_labels' => 'string', - 'invoice_terms' => 'string', - 'credit_footer' => 'string', - 'credit_terms' => 'string', - 'name' => 'string', - 'payment_terms' => 'string', - 'payment_type_id' => 'string', - 'phone' => 'string', - 'postal_code' => 'string', - 'quote_design_id' => 'string', - 'credit_design_id' => 'string', - 'quote_number_pattern' => 'string', - 'quote_number_counter' => 'integer', - 'quote_terms' => 'string', - 'recurring_number_prefix' => 'string', - 'reset_counter_frequency_id' => 'integer', - 'reset_counter_date' => 'string', - 'require_invoice_signature' => 'bool', - 'require_quote_signature' => 'bool', - 'state' => 'string', - 'email' => 'string', - 'vat_number' => 'string', - 'id_number' => 'string', - 'tax_name1' => 'string', - 'tax_name2' => 'string', - 'tax_name3' => 'string', - 'tax_rate1' => 'float', - 'tax_rate2' => 'float', - 'tax_rate3' => 'float', - 'show_accept_quote_terms' => 'bool', - 'show_accept_invoice_terms' => 'bool', - 'timezone_id' => 'string', - 'valid_until' => 'string', - 'date_format_id' => 'string', - 'military_time' => 'bool', - 'language_id' => 'string', - 'show_currency_code' => 'bool', - 'send_reminders' => 'bool', - 'enable_client_portal_tasks' => 'bool', - 'auto_archive_invoice' => 'bool', - 'auto_archive_quote' => 'bool', - 'auto_convert_quote' => 'bool', - 'shared_invoice_quote_counter' => 'bool', - 'counter_padding' => 'integer', + 'invoice_footer' => 'string', + 'invoice_labels' => 'string', + 'invoice_terms' => 'string', + 'credit_footer' => 'string', + 'credit_terms' => 'string', + 'name' => 'string', + 'payment_terms' => 'string', + 'payment_type_id' => 'string', + 'phone' => 'string', + 'postal_code' => 'string', + 'quote_design_id' => 'string', + 'credit_design_id' => 'string', + 'quote_number_pattern' => 'string', + 'quote_number_counter' => 'integer', + 'quote_terms' => 'string', + 'recurring_number_prefix' => 'string', + 'reset_counter_frequency_id' => 'integer', + 'reset_counter_date' => 'string', + 'require_invoice_signature' => 'bool', + 'require_quote_signature' => 'bool', + 'state' => 'string', + 'email' => 'string', + 'vat_number' => 'string', + 'id_number' => 'string', + 'tax_name1' => 'string', + 'tax_name2' => 'string', + 'tax_name3' => 'string', + 'tax_rate1' => 'float', + 'tax_rate2' => 'float', + 'tax_rate3' => 'float', + 'show_accept_quote_terms' => 'bool', + 'show_accept_invoice_terms' => 'bool', + 'timezone_id' => 'string', + 'valid_until' => 'string', + 'date_format_id' => 'string', + 'military_time' => 'bool', + 'language_id' => 'string', + 'show_currency_code' => 'bool', + 'send_reminders' => 'bool', + 'enable_client_portal_tasks' => 'bool', + 'auto_archive_invoice' => 'bool', + 'auto_archive_quote' => 'bool', + 'auto_convert_quote' => 'bool', + 'shared_invoice_quote_counter' => 'bool', + 'counter_padding' => 'integer', //'design' => 'string', - 'website' => 'string', - 'pdf_variables' => 'object', - 'portal_custom_head' => 'string', - 'portal_custom_css' => 'string', - 'portal_custom_footer' => 'string', - 'portal_custom_js' => 'string', - 'client_portal_enable_uploads' => 'bool', - 'purchase_order_number_counter' => 'integer', + 'website' => 'string', + 'pdf_variables' => 'object', + 'portal_custom_head' => 'string', + 'portal_custom_css' => 'string', + 'portal_custom_footer' => 'string', + 'portal_custom_js' => 'string', + 'client_portal_enable_uploads' => 'bool', + 'purchase_order_number_counter' => 'integer', ]; public static $free_plan_casts = [ - 'currency_id' => 'string', - 'company_gateway_ids' => 'string', - 'address1' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'company_logo' => 'string', - 'country_id' => 'string', - 'custom_value1' => 'string', - 'custom_value2' => 'string', - 'custom_value3' => 'string', - 'custom_value4' => 'string', - 'inclusive_taxes' => 'bool', - 'name' => 'string', - 'payment_terms' => 'string', - 'payment_type_id' => 'string', - 'phone' => 'string', - 'postal_code' => 'string', - 'state' => 'string', - 'email' => 'string', - 'vat_number' => 'string', - 'id_number' => 'string', - 'tax_name1' => 'string', - 'tax_name2' => 'string', - 'tax_name3' => 'string', - 'tax_rate1' => 'float', - 'tax_rate2' => 'float', - 'tax_rate3' => 'float', - 'timezone_id' => 'string', - 'date_format_id' => 'string', - 'military_time' => 'bool', - 'language_id' => 'string', - 'show_currency_code' => 'bool', - 'website' => 'string', - 'default_task_rate' => 'float', + 'currency_id' => 'string', + 'company_gateway_ids' => 'string', + 'address1' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'company_logo' => 'string', + 'country_id' => 'string', + 'custom_value1' => 'string', + 'custom_value2' => 'string', + 'custom_value3' => 'string', + 'custom_value4' => 'string', + 'inclusive_taxes' => 'bool', + 'name' => 'string', + 'payment_terms' => 'string', + 'payment_type_id' => 'string', + 'phone' => 'string', + 'postal_code' => 'string', + 'state' => 'string', + 'email' => 'string', + 'vat_number' => 'string', + 'id_number' => 'string', + 'tax_name1' => 'string', + 'tax_name2' => 'string', + 'tax_name3' => 'string', + 'tax_rate1' => 'float', + 'tax_rate2' => 'float', + 'tax_rate3' => 'float', + 'timezone_id' => 'string', + 'date_format_id' => 'string', + 'military_time' => 'bool', + 'language_id' => 'string', + 'show_currency_code' => 'bool', + 'website' => 'string', + 'default_task_rate' => 'float', ]; /** @@ -840,9 +849,9 @@ class CompanySettings extends BaseSettings public static function setProperties($settings): stdClass { $company_settings = (object) get_class_vars(self::class); - + foreach ($company_settings as $key => $value) { - if (! property_exists($settings, $key)) { + if (!property_exists($settings, $key)) { $settings->{$key} = self::castAttribute($key, $company_settings->{$key}); } } @@ -855,7 +864,7 @@ class CompanySettings extends BaseSettings * * @return stdClass */ - public static function notificationDefaults() :stdClass + public static function notificationDefaults(): stdClass { $notification = new stdClass; $notification->email = []; @@ -871,7 +880,7 @@ class CompanySettings extends BaseSettings * * @return stdClass */ - public static function notificationAdminDefaults() :stdClass + public static function notificationAdminDefaults(): stdClass { $notification = new stdClass; $notification->email = []; @@ -888,7 +897,7 @@ class CompanySettings extends BaseSettings * * @return stdClass The stdClass of PDF variables */ - public static function getEntityVariableDefaults() :stdClass + public static function getEntityVariableDefaults(): stdClass { $variables = [ 'client_details' => [ @@ -975,7 +984,7 @@ class CompanySettings extends BaseSettings '$product.tax', '$product.line_total', ], - 'task_columns' =>[ + 'task_columns' => [ '$task.service', '$task.description', '$task.rate', diff --git a/app/DataMapper/Settings/SettingsData.php b/app/DataMapper/Settings/SettingsData.php index 2584a565403e..8f3419eb1fb1 100644 --- a/app/DataMapper/Settings/SettingsData.php +++ b/app/DataMapper/Settings/SettingsData.php @@ -213,7 +213,7 @@ class SettingsData public bool $show_accept_quote_terms = false; //@TODO ben to confirm - public string $email_sending_method = 'default'; // enum 'default', 'gmail', 'office365', 'client_postmark', 'client_mailgun' //@implemented + public string $email_sending_method = 'default'; // enum 'default', 'gmail', 'office365', 'client_postmark', 'client_mailgun' , 'brevo_mailgun' //@implemented public string $gmail_sending_user_id = '0'; //@implemented @@ -433,6 +433,12 @@ class SettingsData public string $mailgun_endpoint = 'api.mailgun.net'; // api.eu.mailgun.net + public string $brevo_secret = ''; + + public string $brevo_domain = ''; + + public string $brevo_endpoint = 'api.mailgun.net'; // api.eu.mailgun.net + public bool $auto_bill_standard_invoices = false; public string $email_alignment = 'center'; // center, left, right @@ -464,13 +470,13 @@ class SettingsData public bool $enable_e_invoice = false; public string $classification = ''; - + private mixed $object; public function cast(mixed $object) { - if(is_array($object)) { - $object = (object)$object; + if (is_array($object)) { + $object = (object) $object; } if (is_object($object)) { @@ -478,9 +484,9 @@ class SettingsData try { settype($object->{$key}, gettype($this->{$key})); - } catch(\Exception | \Error | \Throwable $e) { - - if(property_exists($this, $key)) { + } catch (\Exception | \Error | \Throwable $e) { + + if (property_exists($this, $key)) { $object->{$key} = $this->{$key}; } else { unset($object->{$key}); @@ -506,11 +512,11 @@ class SettingsData public function toObject(): object { - return (object)$this->object; + return (object) $this->object; } public function toArray(): array { - return (array)$this->object; + return (array) $this->object; } } diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 60c3b7fbd81c..8601350b023c 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -62,6 +62,9 @@ class NinjaMailerJob implements ShouldQueue protected $client_mailgun_domain = false; + protected $client_brevo_secret = false; + + protected $client_brevo_domain = false; public function __construct(NinjaMailerObject $nmo, bool $override = false) { @@ -112,16 +115,16 @@ class NinjaMailerJob implements ShouldQueue /* If we have an invitation present, we pass the invitation key into the email headers*/ if ($this->nmo->invitation) { $this->nmo - ->mailable - ->withSymfonyMessage(function ($message) { - $message->getHeaders()->addTextHeader('x-invitation', $this->nmo->invitation->key); - }); + ->mailable + ->withSymfonyMessage(function ($message) { + $message->getHeaders()->addTextHeader('x-invitation', $this->nmo->invitation->key); + }); } //send email try { - nlog("Trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString()); - nlog("Using mailer => ". $this->mailer); + nlog("Trying to send to {$this->nmo->to_user->email} " . now()->toDateTimeString()); + nlog("Using mailer => " . $this->mailer); $mailer = Mail::mailer($this->mailer); @@ -133,23 +136,27 @@ class NinjaMailerJob implements ShouldQueue $mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain, $this->nmo->settings->mailgun_endpoint); } + if ($this->client_brevo_secret) { + $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->nmo->settings->brevo_endpoint); + } + $mailer ->to($this->nmo->to_user->email) ->send($this->nmo->mailable); /* Count the amount of emails sent across all the users accounts */ - Cache::increment("email_quota".$this->company->account->key); + Cache::increment("email_quota" . $this->company->account->key); LightLogs::create(new EmailSuccess($this->nmo->company->company_key, $this->nmo->mailable->subject)) - ->send(); + ->send(); - } catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) { + } catch (\Symfony\Component\Mime\Exception\RfcComplianceException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); $this->logMailError($e->getMessage(), $this->company->clients()->first()); return; - } catch(\Symfony\Component\Mime\Exception\LogicException $e) { + } catch (\Symfony\Component\Mime\Exception\LogicException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); @@ -200,11 +207,11 @@ class NinjaMailerJob implements ShouldQueue app('sentry')->captureException($e); } } - + /* Releasing immediately does not add in the backoff */ sleep(rand(0, 3)); - $this->release($this->backoff()[$this->attempts()-1]); + $this->release($this->backoff()[$this->attempts() - 1]); } $this->nmo = null; @@ -272,6 +279,10 @@ class NinjaMailerJob implements ShouldQueue $this->mailer = 'mailgun'; $this->setMailgunMailer(); return $this; + case 'client_brevo': + $this->mailer = 'brevo'; + $this->setBrevoMailer(); + return $this; default: break; @@ -303,8 +314,8 @@ class NinjaMailerJob implements ShouldQueue if (env($this->company->id . '_MAIL_FROM_ADDRESS')) { $this->nmo - ->mailable - ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); + ->mailable + ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); } } } @@ -322,6 +333,10 @@ class NinjaMailerJob implements ShouldQueue $this->client_mailgun_domain = false; + $this->client_brevo_secret = false; + + $this->client_brevo_domain = false; + //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -381,8 +396,32 @@ class NinjaMailerJob implements ShouldQueue $sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name(); $this->nmo - ->mailable - ->from($sending_email, $sending_user); + ->mailable + ->from($sending_email, $sending_user); + } + + /** + * Configures Brevo using client supplied secret + * as the Mailer + */ + private function setBrevoMailer() + { + if (strlen($this->nmo->settings->brevo_secret) > 2 && strlen($this->nmo->settings->brevo_domain) > 2) { + $this->client_brevo_secret = $this->nmo->settings->brevo_secret; + $this->client_brevo_domain = $this->nmo->settings->brevo_domain; + } else { + $this->nmo->settings->email_sending_method = 'default'; + return $this->setMailDriver(); + } + + $user = $this->resolveSendingUser(); + + $sending_email = (isset($this->nmo->settings->custom_sending_email) && stripos($this->nmo->settings->custom_sending_email, "@")) ? $this->nmo->settings->custom_sending_email : $user->email; + $sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name(); + + $this->nmo + ->mailable + ->from($sending_email, $sending_user); } /** @@ -404,8 +443,8 @@ class NinjaMailerJob implements ShouldQueue $sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name(); $this->nmo - ->mailable - ->from($sending_email, $sending_user); + ->mailable + ->from($sending_email, $sending_user); } /** @@ -417,7 +456,7 @@ class NinjaMailerJob implements ShouldQueue $user = $this->resolveSendingUser(); $this->checkValidSendingUser($user); - + nlog("Sending via {$user->name()}"); $token = $this->refreshOfficeToken($user); @@ -431,11 +470,11 @@ class NinjaMailerJob implements ShouldQueue } $this->nmo - ->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->mailable + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -459,7 +498,7 @@ class NinjaMailerJob implements ShouldQueue } $google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); - } catch(\Exception $e) { + } catch (\Exception $e) { $this->logMailError('Gmail Token Invalid', $this->company->clients()->first()); $this->nmo->settings->email_sending_method = 'default'; return $this->setMailDriver(); @@ -479,7 +518,7 @@ class NinjaMailerJob implements ShouldQueue * Now that our token is refreshed and valid we can boot the * mail driver at runtime and also set the token which will persist * just for this request. - */ + */ $token = $user->oauth_user_token->access_token; @@ -490,11 +529,11 @@ class NinjaMailerJob implements ShouldQueue } $this->nmo - ->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->mailable + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -507,7 +546,7 @@ class NinjaMailerJob implements ShouldQueue private function preFlightChecksFail(): bool { /* Always send regardless */ - if($this->override) { + if ($this->override) { return false; } @@ -527,7 +566,7 @@ class NinjaMailerJob implements ShouldQueue } /* GMail users are uncapped */ - if (Ninja::isHosted() && (in_array($this->nmo->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun']))) { + if (Ninja::isHosted() && (in_array($this->nmo->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun', 'client_brevo']))) { return false; } @@ -545,7 +584,7 @@ class NinjaMailerJob implements ShouldQueue if (!str_contains($this->nmo->to_user->email, "@")) { return true; } - + /* On the hosted platform if the user has not verified their account we fail here - but still check what they are trying to send! */ if (Ninja::isHosted() && $this->company->account && !$this->company->account->account_sms_verified) { if (class_exists(\Modules\Admin\Jobs\Account\EmailQuality::class)) { @@ -570,7 +609,7 @@ class NinjaMailerJob implements ShouldQueue * @param \App\Models\User | \App\Models\Client | null $recipient_object * @return void */ - private function logMailError($errors, $recipient_object) :void + private function logMailError($errors, $recipient_object): void { (new SystemLogger( $errors, @@ -586,7 +625,7 @@ class NinjaMailerJob implements ShouldQueue $job_failure->string_metric6 = substr($errors, 0, 150); LightLogs::create($job_failure) - ->send(); + ->send(); $job_failure = null; } @@ -611,14 +650,14 @@ class NinjaMailerJob implements ShouldQueue $token = json_decode($guzzle->post($url, [ 'form_params' => [ - 'client_id' => config('ninja.o365.client_id') , - 'client_secret' => config('ninja.o365.client_secret') , + 'client_id' => config('ninja.o365.client_id'), + 'client_secret' => config('ninja.o365.client_secret'), 'scope' => 'email Mail.Send offline_access profile User.Read openid', 'grant_type' => 'refresh_token', 'refresh_token' => $user->oauth_user_refresh_token ], ])->getBody()->getContents()); - + if ($token) { $user->oauth_user_refresh_token = property_exists($token, 'refresh_token') ? $token->refresh_token : $user->oauth_user_refresh_token; $user->oauth_user_token = $token->access_token; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 0b4a78cc1527..7bde51699e6a 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -54,7 +54,7 @@ class AppServiceProvider extends ServiceProvider /* Defines the name used in polymorphic tables */ Relation::morphMap([ - 'invoices' => Invoice::class, + 'invoices' => Invoice::class, 'proposals' => Proposal::class, ]); @@ -96,11 +96,10 @@ class AppServiceProvider extends ServiceProvider 'transport' => 'postmark', 'token' => $postmark_key ])); - + return $this; }); - - + Mailer::macro('mailgun_config', function (string $secret, string $domain, string $endpoint = 'api.mailgun.net') { // @phpstan-ignore /** @phpstan-ignore-next-line **/ Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([ @@ -110,7 +109,20 @@ class AppServiceProvider extends ServiceProvider 'endpoint' => $endpoint, 'scheme' => config('services.mailgun.scheme'), ])); - + + return $this; + }); + + Mailer::macro('brevo_config', function (string $secret, string $domain, string $endpoint = 'api.mailgun.net') { + // @phpstan-ignore /** @phpstan-ignore-next-line **/ + Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([ + 'transport' => 'brevo', + 'secret' => $secret, + 'domain' => $domain, + 'endpoint' => $endpoint, + 'scheme' => config('services.brevo.scheme'), + ])); + return $this; }); diff --git a/app/Services/Email/AdminEmail.php b/app/Services/Email/AdminEmail.php index 0555cb8afc80..a6f5dc6b78d0 100644 --- a/app/Services/Email/AdminEmail.php +++ b/app/Services/Email/AdminEmail.php @@ -55,6 +55,12 @@ class AdminEmail implements ShouldQueue protected ?string $client_mailgun_endpoint = null; + protected ?string $client_brevo_secret = null; + + protected ?string $client_brevo_domain = null; + + protected ?string $client_brevo_endpoint = null; + private string $mailer = 'default'; public Mailable $mailable; @@ -62,7 +68,7 @@ class AdminEmail implements ShouldQueue public function __construct(public EmailObject $email_object, public Company $company) { } - + /** * The backoff time between retries. * @@ -78,7 +84,7 @@ class AdminEmail implements ShouldQueue MultiDB::setDb($this->company->db); $this->setOverride() - ->buildMailable(); + ->buildMailable(); if ($this->preFlightChecksFail()) { return; @@ -87,7 +93,7 @@ class AdminEmail implements ShouldQueue $this->email(); } - + /** * Sets the override flag * @@ -99,7 +105,7 @@ class AdminEmail implements ShouldQueue return $this; } - + /** * Populates the mailable * @@ -108,10 +114,10 @@ class AdminEmail implements ShouldQueue public function buildMailable(): self { $this->mailable = new AdminEmailMailable($this->email_object); - + return $this; } - + /** * Attempts to send the email * @@ -133,24 +139,28 @@ class AdminEmail implements ShouldQueue $mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain, $this->client_mailgun_endpoint); } + if ($this->client_brevo_secret) { + $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->client_brevo_endpoint); + } + /* Attempt the send! */ try { - nlog("Using mailer => ". $this->mailer. " ". now()->toDateTimeString()); - + nlog("Using mailer => " . $this->mailer . " " . now()->toDateTimeString()); + $mailer->send($this->mailable); - Cache::increment("email_quota".$this->company->account->key); + Cache::increment("email_quota" . $this->company->account->key); LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject)) - ->send(); + ->send(); - } catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) { + } catch (\Symfony\Component\Mime\Exception\RfcComplianceException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); $this->logMailError($e->getMessage(), $this->company->clients()->first()); return; - } catch(\Symfony\Component\Mime\Exception\LogicException $e) { + } catch (\Symfony\Component\Mime\Exception\LogicException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); @@ -178,12 +188,12 @@ class AdminEmail implements ShouldQueue if ($e instanceof ClientException) { //postmark specific failure $response = $e->getResponse(); $message_body = json_decode($response->getBody()->getContents()); - + if ($message_body && property_exists($message_body, 'Message')) { $message = $message_body->Message; nlog($message); } - + $this->fail(); $this->cleanUpMailers(); return; @@ -202,7 +212,7 @@ class AdminEmail implements ShouldQueue sleep(rand(0, 3)); - $this->release($this->backoff()[$this->attempts()-1]); + $this->release($this->backoff()[$this->attempts() - 1]); $message = null; } @@ -211,16 +221,16 @@ class AdminEmail implements ShouldQueue } /** - * On the hosted platform we scan all outbound email for - * spam. This sequence processes the filters we use on all - * emails. - * - * @return bool - */ + * On the hosted platform we scan all outbound email for + * spam. This sequence processes the filters we use on all + * emails. + * + * @return bool + */ public function preFlightChecksFail(): bool { /* Always send if disabled */ - if($this->override) { + if ($this->override) { return false; } @@ -280,7 +290,7 @@ class AdminEmail implements ShouldQueue return false; } - + /** * hasInValidEmails * @@ -333,6 +343,10 @@ class AdminEmail implements ShouldQueue $this->mailer = 'mailgun'; $this->setMailgunMailer(); return $this; + case 'client_brevo': + $this->mailer = 'brevo'; + $this->setBrevoMailer(); + return $this; default: $this->mailer = config('mail.default'); @@ -365,7 +379,7 @@ class AdminEmail implements ShouldQueue if (env($this->company->id . '_MAIL_FROM_ADDRESS')) { $this->mailable - ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); + ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); } } } @@ -386,6 +400,12 @@ class AdminEmail implements ShouldQueue $this->client_mailgun_endpoint = null; + $this->client_brevo_secret = null; + + $this->client_brevo_domain = null; + + $this->client_brevo_endpoint = null; + //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -402,7 +422,7 @@ class AdminEmail implements ShouldQueue /* Always ensure the user is set on the correct account */ if ($user->account_id != $this->company->account_id) { $this->email_object->settings->email_sending_method = 'default'; - + return $this->setMailDriver(); } } @@ -448,7 +468,31 @@ class AdminEmail implements ShouldQueue $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); $this->mailable - ->from($sending_email, $sending_user); + ->from($sending_email, $sending_user); + } + /** + * Configures Brevo using client supplied secret + * as the Mailer + */ + private function setBrevoMailer() + { + if (strlen($this->email_object->settings->brevo_secret) > 2 && strlen($this->email_object->settings->brevo_domain) > 2) { + $this->client_brevo_secret = $this->email_object->settings->brevo_secret; + $this->client_brevo_domain = $this->email_object->settings->brevo_domain; + $this->client_brevo_endpoint = $this->email_object->settings->brevo_endpoint; + + } else { + $this->email_object->settings->email_sending_method = 'default'; + return $this->setMailDriver(); + } + + $user = $this->resolveSendingUser(); + + $sending_email = (isset($this->email_object->settings->custom_sending_email) && stripos($this->email_object->settings->custom_sending_email, "@")) ? $this->email_object->settings->custom_sending_email : $user->email; + $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); + + $this->mailable + ->from($sending_email, $sending_user); } /** @@ -468,9 +512,9 @@ class AdminEmail implements ShouldQueue $sending_email = (isset($this->email_object->settings->custom_sending_email) && stripos($this->email_object->settings->custom_sending_email, "@")) ? $this->email_object->settings->custom_sending_email : $user->email; $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); - + $this->mailable - ->from($sending_email, $sending_user); + ->from($sending_email, $sending_user); } /** @@ -480,9 +524,9 @@ class AdminEmail implements ShouldQueue private function setOfficeMailer() { $user = $this->resolveSendingUser(); - + $this->checkValidSendingUser($user); - + nlog("Sending via {$user->name()}"); $token = $this->refreshOfficeToken($user); @@ -496,10 +540,10 @@ class AdminEmail implements ShouldQueue } $this->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -511,7 +555,7 @@ class AdminEmail implements ShouldQueue $user = $this->resolveSendingUser(); $this->checkValidSendingUser($user); - + nlog("Sending via {$user->name()}"); $google = (new Google())->init(); @@ -523,7 +567,7 @@ class AdminEmail implements ShouldQueue } $google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); - } catch(\Exception $e) { + } catch (\Exception $e) { $this->logMailError('Gmail Token Invalid', $this->company->clients()->first()); $this->email_object->settings->email_sending_method = 'default'; return $this->setMailDriver(); @@ -543,7 +587,7 @@ class AdminEmail implements ShouldQueue * Now that our token is refreshed and valid we can boot the * mail driver at runtime and also set the token which will persist * just for this request. - */ + */ $token = $user->oauth_user_token->access_token; @@ -554,10 +598,10 @@ class AdminEmail implements ShouldQueue } $this->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -567,7 +611,7 @@ class AdminEmail implements ShouldQueue * @param null | \App\Models\Client $recipient_object * @return void */ - private function logMailError($errors, $recipient_object) :void + private function logMailError($errors, $recipient_object): void { (new SystemLogger( $errors, @@ -583,7 +627,7 @@ class AdminEmail implements ShouldQueue $job_failure->string_metric6 = substr($errors, 0, 150); LightLogs::create($job_failure) - ->send(); + ->send(); $job_failure = null; } @@ -604,14 +648,14 @@ class AdminEmail implements ShouldQueue $token = json_decode($guzzle->post($url, [ 'form_params' => [ - 'client_id' => config('ninja.o365.client_id') , - 'client_secret' => config('ninja.o365.client_secret') , + 'client_id' => config('ninja.o365.client_id'), + 'client_secret' => config('ninja.o365.client_secret'), 'scope' => 'email Mail.Send offline_access profile User.Read openid', 'grant_type' => 'refresh_token', 'refresh_token' => $user->oauth_user_refresh_token ], ])->getBody()->getContents()); - + if ($token) { $user->oauth_user_refresh_token = property_exists($token, 'refresh_token') ? $token->refresh_token : $user->oauth_user_refresh_token; $user->oauth_user_token = $token->access_token; diff --git a/app/Services/Email/Email.php b/app/Services/Email/Email.php index fa7cd008e33a..caffd425e3be 100644 --- a/app/Services/Email/Email.php +++ b/app/Services/Email/Email.php @@ -60,6 +60,12 @@ class Email implements ShouldQueue protected ?string $client_mailgun_endpoint = null; + protected ?string $client_brevo_secret = null; + + protected ?string $client_brevo_domain = null; + + protected ?string $client_brevo_endpoint = null; + private string $mailer = 'default'; public Mailable $mailable; @@ -67,7 +73,7 @@ class Email implements ShouldQueue public function __construct(public EmailObject $email_object, public Company $company) { } - + /** * The backoff time between retries. * @@ -83,9 +89,9 @@ class Email implements ShouldQueue MultiDB::setDb($this->company->db); $this->setOverride() - ->initModels() - ->setDefaults() - ->buildMailable(); + ->initModels() + ->setDefaults() + ->buildMailable(); /** Ensure quota's on hosted platform are respected. :) */ $this->setMailDriver(); @@ -98,7 +104,7 @@ class Email implements ShouldQueue $this->tearDown(); } - + /** * Sets the override flag * @@ -110,7 +116,7 @@ class Email implements ShouldQueue return $this; } - + /** * Initilializes the models * @@ -122,19 +128,19 @@ class Email implements ShouldQueue $this->email_object->invitation_id ? $this->email_object->invitation = $this->email_object->entity->invitations()->where('id', $this->email_object->invitation_id)->first() : $this->email_object->invitation = null; - $this->email_object->invitation_id ? $this->email_object->contact = $this->email_object->invitation->contact : $this->email_object->contact = null; + $this->email_object->invitation_id ? $this->email_object->contact = $this->email_object->invitation->contact : $this->email_object->contact = null; $this->email_object->client_id ? $this->email_object->client = Client::withTrashed()->find($this->email_object->client_id) : $this->email_object->client = null; - - $this->email_object->vendor_id ? $this->email_object->vendor = Vendor::withTrashed()->find($this->email_object->vendor_id) : $this->email_object->vendor = null; - - if (!$this->email_object->contact) { - $this->email_object->vendor_contact_id ? $this->email_object->contact = VendorContact::withTrashed()->find($this->email_object->vendor_contact_id) : null; - $this->email_object->client_contact_id ? $this->email_object->contact = ClientContact::withTrashed()->find($this->email_object->client_contact_id) : null; + $this->email_object->vendor_id ? $this->email_object->vendor = Vendor::withTrashed()->find($this->email_object->vendor_id) : $this->email_object->vendor = null; + + if (!$this->email_object->contact) { + $this->email_object->vendor_contact_id ? $this->email_object->contact = VendorContact::withTrashed()->find($this->email_object->vendor_contact_id) : null; + + $this->email_object->client_contact_id ? $this->email_object->contact = ClientContact::withTrashed()->find($this->email_object->client_contact_id) : null; } - $this->email_object->user_id ? $this->email_object->user = User::withTrashed()->find($this->email_object->user_id) : $this->email_object->user = $this->company->owner(); + $this->email_object->user_id ? $this->email_object->user = User::withTrashed()->find($this->email_object->user_id) : $this->email_object->user = $this->company->owner(); $this->email_object->company_key = $this->company->company_key; @@ -151,12 +157,12 @@ class Email implements ShouldQueue $this->email_object->signature = $this->email_object->settings->email_signature; $this->email_object->invitation_key = $this->email_object->invitation ? $this->email_object->invitation->key : null; - + $this->resolveVariables(); return $this; } - + /** * Generates the correct set of variables * @todo handle payment engine here also @@ -165,7 +171,7 @@ class Email implements ShouldQueue private function resolveVariables(): self { $_variables = $this->email_object->variables; - + match (class_basename($this->email_object->entity)) { "Invoice" => $this->email_object->variables = (new HtmlEngine($this->email_object->invitation))->makeValues(), "Quote" => $this->email_object->variables = (new HtmlEngine($this->email_object->invitation))->makeValues(), @@ -181,7 +187,7 @@ class Email implements ShouldQueue return $this; } - + /** * tearDown * @@ -199,7 +205,7 @@ class Email implements ShouldQueue return $this; } - + /** * Builds the email defaults * @@ -211,7 +217,7 @@ class Email implements ShouldQueue return $this; } - + /** * Populates the mailable * @@ -220,10 +226,10 @@ class Email implements ShouldQueue public function buildMailable(): self { $this->mailable = new EmailMailable($this->email_object); - + return $this; } - + /** * Attempts to send the email * @@ -245,24 +251,28 @@ class Email implements ShouldQueue $mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain, $this->client_mailgun_endpoint); } + if ($this->client_brevo_secret) { + $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->client_brevo_endpoint); + } + /* Attempt the send! */ try { - nlog("Using mailer => ". $this->mailer. " ". now()->toDateTimeString()); - + nlog("Using mailer => " . $this->mailer . " " . now()->toDateTimeString()); + $mailer->send($this->mailable); - Cache::increment("email_quota".$this->company->account->key); + Cache::increment("email_quota" . $this->company->account->key); LightLogs::create(new EmailSuccess($this->company->company_key, $this->mailable->subject)) - ->send(); + ->send(); - } catch(\Symfony\Component\Mime\Exception\RfcComplianceException $e) { + } catch (\Symfony\Component\Mime\Exception\RfcComplianceException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); $this->logMailError($e->getMessage(), $this->company->clients()->first()); return; - } catch(\Symfony\Component\Mime\Exception\LogicException $e) { + } catch (\Symfony\Component\Mime\Exception\LogicException $e) { nlog("Mailer failed with a Logic Exception {$e->getMessage()}"); $this->fail(); $this->cleanUpMailers(); @@ -288,7 +298,7 @@ class Email implements ShouldQueue $address_object = reset($this->email_object->to); $email = $address_object->address ?? ''; - + $message = "Recipient {$email} has been suppressed and cannot receive emails from you."; $this->fail(); @@ -306,12 +316,12 @@ class Email implements ShouldQueue if ($e instanceof ClientException) { //postmark specific failure $response = $e->getResponse(); $message_body = json_decode($response->getBody()->getContents()); - + if ($message_body && property_exists($message_body, 'Message')) { $message = $message_body->Message; nlog($message); } - + $this->fail(); $this->cleanUpMailers(); return; @@ -333,7 +343,7 @@ class Email implements ShouldQueue sleep(rand(0, 3)); - $this->release($this->backoff()[$this->attempts()-1]); + $this->release($this->backoff()[$this->attempts() - 1]); $message = null; } @@ -342,16 +352,16 @@ class Email implements ShouldQueue } /** - * On the hosted platform we scan all outbound email for - * spam. This sequence processes the filters we use on all - * emails. - * - * @return bool - */ + * On the hosted platform we scan all outbound email for + * spam. This sequence processes the filters we use on all + * emails. + * + * @return bool + */ public function preFlightChecksFail(): bool { /* Always send if disabled */ - if($this->override) { + if ($this->override) { return false; } @@ -411,7 +421,7 @@ class Email implements ShouldQueue return false; } - + /** * hasInValidEmails * @@ -436,7 +446,7 @@ class Email implements ShouldQueue return true; } - if($address_object->name == " " || $address_object->name == "") { + if ($address_object->name == " " || $address_object->name == "") { return true; } } @@ -472,6 +482,10 @@ class Email implements ShouldQueue $this->mailer = 'mailgun'; $this->setMailgunMailer(); return $this; + case 'client_brevo': + $this->mailer = 'brevo'; + $this->setBrevoMailer(); + return $this; default: $this->mailer = config('mail.default'); @@ -504,7 +518,7 @@ class Email implements ShouldQueue if (env($this->company->id . '_MAIL_FROM_ADDRESS')) { $this->mailable - ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); + ->from(env($this->company->id . '_MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')), env($this->company->id . '_MAIL_FROM_NAME', env('MAIL_FROM_NAME'))); } } } @@ -525,6 +539,12 @@ class Email implements ShouldQueue $this->client_mailgun_endpoint = null; + $this->client_brevo_secret = null; + + $this->client_brevo_domain = null; + + $this->client_brevo_endpoint = null; + //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -541,7 +561,7 @@ class Email implements ShouldQueue /* Always ensure the user is set on the correct account */ if ($user->account_id != $this->company->account_id) { $this->email_object->settings->email_sending_method = 'default'; - + return $this->setMailDriver(); } } @@ -587,7 +607,31 @@ class Email implements ShouldQueue $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); $this->mailable - ->from($sending_email, $sending_user); + ->from($sending_email, $sending_user); + } + /** + * Configures Brevo using client supplied secret + * as the Mailer + */ + private function setBrevoMailer() + { + if (strlen($this->email_object->settings->brevo_secret) > 2 && strlen($this->email_object->settings->brevo_domain) > 2) { + $this->client_brevo_secret = $this->email_object->settings->brevo_secret; + $this->client_brevo_domain = $this->email_object->settings->brevo_domain; + $this->client_brevo_endpoint = $this->email_object->settings->brevo_endpoint; + + } else { + $this->email_object->settings->email_sending_method = 'default'; + return $this->setMailDriver(); + } + + $user = $this->resolveSendingUser(); + + $sending_email = (isset($this->email_object->settings->custom_sending_email) && stripos($this->email_object->settings->custom_sending_email, "@")) ? $this->email_object->settings->custom_sending_email : $user->email; + $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); + + $this->mailable + ->from($sending_email, $sending_user); } /** @@ -607,9 +651,9 @@ class Email implements ShouldQueue $sending_email = (isset($this->email_object->settings->custom_sending_email) && stripos($this->email_object->settings->custom_sending_email, "@")) ? $this->email_object->settings->custom_sending_email : $user->email; $sending_user = (isset($this->email_object->settings->email_from_name) && strlen($this->email_object->settings->email_from_name) > 2) ? $this->email_object->settings->email_from_name : $user->name(); - + $this->mailable - ->from($sending_email, $sending_user); + ->from($sending_email, $sending_user); } /** @@ -619,9 +663,9 @@ class Email implements ShouldQueue private function setOfficeMailer() { $user = $this->resolveSendingUser(); - + $this->checkValidSendingUser($user); - + nlog("Sending via {$user->name()}"); $token = $this->refreshOfficeToken($user); @@ -635,10 +679,10 @@ class Email implements ShouldQueue } $this->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -650,7 +694,7 @@ class Email implements ShouldQueue $user = $this->resolveSendingUser(); $this->checkValidSendingUser($user); - + nlog("Sending via {$user->name()}"); $google = (new Google())->init(); @@ -662,7 +706,7 @@ class Email implements ShouldQueue } $google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); - } catch(\Exception $e) { + } catch (\Exception $e) { $this->logMailError('Gmail Token Invalid', $this->company->clients()->first()); $this->email_object->settings->email_sending_method = 'default'; return $this->setMailDriver(); @@ -682,7 +726,7 @@ class Email implements ShouldQueue * Now that our token is refreshed and valid we can boot the * mail driver at runtime and also set the token which will persist * just for this request. - */ + */ $token = $user->oauth_user_token->access_token; @@ -693,10 +737,10 @@ class Email implements ShouldQueue } $this->mailable - ->from($user->email, $user->name()) - ->withSymfonyMessage(function ($message) use ($token) { - $message->getHeaders()->addTextHeader('gmailtoken', $token); - }); + ->from($user->email, $user->name()) + ->withSymfonyMessage(function ($message) use ($token) { + $message->getHeaders()->addTextHeader('gmailtoken', $token); + }); } /** @@ -706,7 +750,7 @@ class Email implements ShouldQueue * @param null | \App\Models\Client $recipient_object * @return void */ - private function logMailError($errors, $recipient_object) :void + private function logMailError($errors, $recipient_object): void { (new SystemLogger( $errors, @@ -722,7 +766,7 @@ class Email implements ShouldQueue $job_failure->string_metric6 = substr($errors, 0, 150); LightLogs::create($job_failure) - ->send(); + ->send(); $job_failure = null; } @@ -743,14 +787,14 @@ class Email implements ShouldQueue $token = json_decode($guzzle->post($url, [ 'form_params' => [ - 'client_id' => config('ninja.o365.client_id') , - 'client_secret' => config('ninja.o365.client_secret') , + 'client_id' => config('ninja.o365.client_id'), + 'client_secret' => config('ninja.o365.client_secret'), 'scope' => 'email Mail.Send offline_access profile User.Read openid', 'grant_type' => 'refresh_token', 'refresh_token' => $user->oauth_user_refresh_token ], ])->getBody()->getContents()); - + if ($token) { $user->oauth_user_refresh_token = property_exists($token, 'refresh_token') ? $token->refresh_token : $user->oauth_user_refresh_token; $user->oauth_user_token = $token->access_token; diff --git a/composer.json b/composer.json index 1ef66cdd1760..24f9adb861fc 100644 --- a/composer.json +++ b/composer.json @@ -91,6 +91,7 @@ "sprain/swiss-qr-bill": "^4.3", "square/square": "30.0.0.*", "stripe/stripe-php": "^12", + "symfony/brevo-mailer": "^7.0", "symfony/http-client": "^6.0", "symfony/mailgun-mailer": "^6.1", "symfony/postmark-mailer": "^6.1", @@ -179,4 +180,4 @@ ], "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 27dc537efdb9..4bafa42c02d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28b57fe6eac3d71c607125cda9a6a537", + "content-hash": "ba57ee16621201bac10def4422ba9161", "packages": [ { "name": "afosto/yaac", @@ -10716,6 +10716,75 @@ }, "time": "2023-10-16T18:04:12+00:00" }, + { + "name": "symfony/brevo-mailer", + "version": "v7.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/brevo-mailer.git", + "reference": "83db87e0f44653cd40aeef54a2f57ab6bfccadfe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/brevo-mailer/zipball/83db87e0f44653cd40aeef54a2f57ab6bfccadfe", + "reference": "83db87e0f44653cd40aeef54a2f57ab6bfccadfe", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/mailer": "^5.4.21|^6.2.7|^7.0" + }, + "conflict": { + "symfony/mime": "<6.2" + }, + "require-dev": { + "symfony/http-client": "^6.3|^7.0", + "symfony/webhook": "^6.3|^7.0" + }, + "type": "symfony-mailer-bridge", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\Bridge\\Brevo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pierre Tanguy", + "homepage": "https://github.com/petanguy" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Brevo Mailer Bridge", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/brevo-mailer/tree/v7.0.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-06T17:20:05+00:00" + }, { "name": "symfony/console", "version": "v6.4.1", @@ -18046,5 +18115,5 @@ "platform-dev": { "php": "^8.1|^8.2" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/mail.php b/config/mail.php index 0cd235b4048f..a9a86b08acc3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -28,7 +28,7 @@ return [ | sending an e-mail. You will specify which one you are using for your | mailers below. You are free to add additional mailers as required. | - | Supported: "smtp", "sendmail", "mailgun", "ses", + | Supported: "smtp", "sendmail", "mailgun", "brevo", "ses", | "postmark", "log", "array", "failover" | */ @@ -54,6 +54,10 @@ return [ 'transport' => 'mailgun', ], + 'brevo' => [ + 'transport' => 'brevo', + ], + 'postmark' => [ 'transport' => 'postmark', ], diff --git a/config/services.php b/config/services.php index e252ef9a4b27..aa1f51e03ef9 100644 --- a/config/services.php +++ b/config/services.php @@ -12,7 +12,7 @@ return [ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto + | as Mailgun, Brevo, Postmark, AWS and more. This file provides the de facto | location for this type of information, allowing packages to have | a conventional file to locate the various service credentials. | @@ -25,6 +25,13 @@ return [ 'scheme' => 'https', ], + 'brevo' => [ + 'domain' => env('BREVO_DOMAIN', ''), + 'secret' => env('BREVO_SECRET', ''), + 'endpoint' => env('BREVO_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', + ], + 'postmark' => [ 'token' => env('POSTMARK_SECRET', ''), ], @@ -55,8 +62,8 @@ return [ ], 'stripe' => [ - 'model' => App\Models\User::class, - 'key' => env('STRIPE_KEY'), + 'model' => App\Models\User::class, + 'key' => env('STRIPE_KEY'), 'secret' => env('STRIPE_SECRET'), ], diff --git a/lang/en/texts.php b/lang/en/texts.php index a4bc7734fc4b..db98c6da3229 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -2237,6 +2237,8 @@ $lang = array( 'encryption' => 'Encryption', 'mailgun_domain' => 'Mailgun Domain', 'mailgun_private_key' => 'Mailgun Private Key', + 'brevo_domain' => 'Brevo Domain', + 'brevo_private_key' => 'Brevo Private Key', 'send_test_email' => 'Send test email', 'select_label' => 'Select Label', 'label' => 'Label', @@ -3857,308 +3859,308 @@ $lang = array( 'registration_url' => 'Registration URL', 'show_product_cost' => 'Show Product Cost', 'complete' => 'Complete', - 'next' => 'Next', - 'next_step' => 'Next step', - 'notification_credit_sent_subject' => 'Credit :invoice was sent to :client', - 'notification_credit_viewed_subject' => 'Credit :invoice was viewed by :client', - 'notification_credit_sent' => 'The following client :client was emailed Credit :invoice for :amount.', - 'notification_credit_viewed' => 'The following client :client viewed Credit :credit for :amount.', - 'reset_password_text' => 'Enter your email to reset your password.', - 'password_reset' => 'Password reset', - 'account_login_text' => 'Welcome! Glad to see you.', - 'request_cancellation' => 'Request cancellation', - 'delete_payment_method' => 'Delete Payment Method', - 'about_to_delete_payment_method' => 'You are about to delete the payment method.', - 'action_cant_be_reversed' => 'Action can\'t be reversed', - 'profile_updated_successfully' => 'The profile has been updated successfully.', - 'currency_ethiopian_birr' => 'Ethiopian Birr', - 'client_information_text' => 'Use a permanent address where you can receive mail.', - 'status_id' => 'Invoice Status', - 'email_already_register' => 'This email is already linked to an account', - 'locations' => 'Locations', - 'freq_indefinitely' => 'Indefinitely', - 'cycles_remaining' => 'Cycles remaining', - 'i_understand_delete' => 'I understand, delete', - 'download_files' => 'Download Files', - 'download_timeframe' => 'Use this link to download your files, the link will expire in 1 hour.', - 'new_signup' => 'New Signup', - 'new_signup_text' => 'A new account has been created by :user - :email - from IP address: :ip', - 'notification_payment_paid_subject' => 'Payment was made by :client', - 'notification_partial_payment_paid_subject' => 'Partial payment was made by :client', - 'notification_payment_paid' => 'A payment of :amount was made by client :client towards :invoice', - 'notification_partial_payment_paid' => 'A partial payment of :amount was made by client :client towards :invoice', - 'notification_bot' => 'Notification Bot', - 'invoice_number_placeholder' => 'Invoice # :invoice', - 'entity_number_placeholder' => ':entity # :entity_number', - 'email_link_not_working' => 'If the button above isn\'t working for you, please click on the link', - 'display_log' => 'Display Log', - 'send_fail_logs_to_our_server' => 'Report errors in realtime', - 'setup' => 'Setup', - 'quick_overview_statistics' => 'Quick overview & statistics', - 'update_your_personal_info' => 'Update your personal information', - 'name_website_logo' => 'Name, website & logo', - 'make_sure_use_full_link' => 'Make sure you use full link to your site', - 'personal_address' => 'Personal address', - 'enter_your_personal_address' => 'Enter your personal address', - 'enter_your_shipping_address' => 'Enter your shipping address', - 'list_of_invoices' => 'List of invoices', - 'with_selected' => 'With selected', - 'invoice_still_unpaid' => 'This invoice is still not paid. Click the button to complete the payment', - 'list_of_recurring_invoices' => 'List of recurring invoices', - 'details_of_recurring_invoice' => 'Here are some details about recurring invoice', - 'cancellation' => 'Cancellation', - 'about_cancellation' => 'In case you want to stop the recurring invoice, please click to request the cancellation.', - 'cancellation_warning' => 'Warning! You are requesting a cancellation of this service. Your service may be cancelled with no further notification to you.', - 'cancellation_pending' => 'Cancellation pending, we\'ll be in touch!', - 'list_of_payments' => 'List of payments', - 'payment_details' => 'Details of the payment', - 'list_of_payment_invoices' => 'List of invoices affected by the payment', - 'list_of_payment_methods' => 'List of payment methods', - 'payment_method_details' => 'Details of payment method', - 'permanently_remove_payment_method' => 'Permanently remove this payment method.', - 'warning_action_cannot_be_reversed' => 'Warning! This action can not be reversed!', - 'confirmation' => 'Confirmation', - 'list_of_quotes' => 'Quotes', - 'waiting_for_approval' => 'Waiting for approval', - 'quote_still_not_approved' => 'This quote is still not approved', - 'list_of_credits' => 'Credits', - 'required_extensions' => 'Required extensions', - 'php_version' => 'PHP version', - 'writable_env_file' => 'Writable .env file', - 'env_not_writable' => '.env file is not writable by the current user.', - 'minumum_php_version' => 'Minimum PHP version', - 'satisfy_requirements' => 'Make sure all requirements are satisfied.', - 'oops_issues' => 'Oops, something does not look right!', - 'open_in_new_tab' => 'Open in new tab', - 'complete_your_payment' => 'Complete payment', - 'authorize_for_future_use' => 'Authorize payment method for future use', - 'page' => 'Page', - 'per_page' => 'Per page', - 'of' => 'Of', - 'view_credit' => 'View Credit', - 'to_view_entity_password' => 'To view the :entity you need to enter password.', - 'showing_x_of' => 'Showing :first to :last out of :total results', - 'no_results' => 'No results found.', - 'payment_failed_subject' => 'Payment failed for Client :client', - 'payment_failed_body' => 'A payment made by client :client failed with message :message', - 'register' => 'Register', - 'register_label' => 'Create your account in seconds', - 'password_confirmation' => 'Confirm your password', - 'verification' => 'Verification', - 'complete_your_bank_account_verification' => 'Before using a bank account it must be verified.', - 'checkout_com' => 'Checkout.com', - 'footer_label' => 'Copyright © :year :company.', - 'credit_card_invalid' => 'Provided credit card number is not valid.', - 'month_invalid' => 'Provided month is not valid.', - 'year_invalid' => 'Provided year is not valid.', - 'https_required' => 'HTTPS is required, form will fail', - 'if_you_need_help' => 'If you need help you can post to our', - 'update_password_on_confirm' => 'After updating password, your account will be confirmed.', - 'bank_account_not_linked' => 'To pay with a bank account, first you have to add it as payment method.', - 'application_settings_label' => 'Let\'s store basic information about your Invoice Ninja!', - 'recommended_in_production' => 'Highly recommended in production', - 'enable_only_for_development' => 'Enable only for development', - 'test_pdf' => 'Test PDF', - 'checkout_authorize_label' => 'Checkout.com can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Store credit card details" during payment process.', - 'sofort_authorize_label' => 'Bank account (SOFORT) can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Store payment details" during payment process.', - 'node_status' => 'Node status', - 'npm_status' => 'NPM status', - 'node_status_not_found' => 'I could not find Node anywhere. Is it installed?', - 'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?', - 'locked_invoice' => 'This invoice is locked and unable to be modified', - 'downloads' => 'Downloads', - 'resource' => 'Resource', - 'document_details' => 'Details about the document', - 'hash' => 'Hash', - 'resources' => 'Resources', - 'allowed_file_types' => 'Allowed file types:', - 'common_codes' => 'Common codes and their meanings', - 'payment_error_code_20087' => '20087: Bad Track Data (invalid CVV and/or expiry date)', - 'download_selected' => 'Download selected', - 'to_pay_invoices' => 'To pay invoices, you have to', - 'add_payment_method_first' => 'add payment method', - 'no_items_selected' => 'No items selected.', - 'payment_due' => 'Payment due', - 'account_balance' => 'Account Balance', - 'thanks' => 'Thanks', - 'minimum_required_payment' => 'Minimum required payment is :amount', - 'under_payments_disabled' => 'Company doesn\'t support underpayments.', - 'over_payments_disabled' => 'Company doesn\'t support overpayments.', - 'saved_at' => 'Saved at :time', - 'credit_payment' => 'Credit applied to Invoice :invoice_number', - 'credit_subject' => 'New credit :number from :account', - 'credit_message' => 'To view your credit for :amount, click the link below.', - 'payment_type_Crypto' => 'Cryptocurrency', - 'payment_type_Credit' => 'Credit', - 'store_for_future_use' => 'Store for future use', - 'pay_with_credit' => 'Pay with credit', - 'payment_method_saving_failed' => 'Payment method can\'t be saved for future use.', - 'pay_with' => 'Pay with', - 'n/a' => 'N/A', - 'by_clicking_next_you_accept_terms' => 'By clicking "Next step" you accept terms.', - 'not_specified' => 'Not specified', - 'before_proceeding_with_payment_warning' => 'Before proceeding with payment, you have to fill following fields', - 'after_completing_go_back_to_previous_page' => 'After completing, go back to previous page.', - 'pay' => 'Pay', - 'instructions' => 'Instructions', - 'notification_invoice_reminder1_sent_subject' => 'Reminder 1 for Invoice :invoice was sent to :client', - 'notification_invoice_reminder2_sent_subject' => 'Reminder 2 for Invoice :invoice was sent to :client', - 'notification_invoice_reminder3_sent_subject' => 'Reminder 3 for Invoice :invoice was sent to :client', - 'notification_invoice_custom_sent_subject' => 'Custom reminder for Invoice :invoice was sent to :client', - 'notification_invoice_reminder_endless_sent_subject' => 'Endless reminder for Invoice :invoice was sent to :client', - 'assigned_user' => 'Assigned User', - 'setup_steps_notice' => 'To proceed to next step, make sure you test each section.', - 'setup_phantomjs_note' => 'Note about Phantom JS. Read more.', - 'minimum_payment' => 'Minimum Payment', - 'no_action_provided' => 'No action provided. If you believe this is wrong, please contact the support.', - 'no_payable_invoices_selected' => 'No payable invoices selected. Make sure you are not trying to pay draft invoice or invoice with zero balance due.', - 'required_payment_information' => 'Required payment details', - 'required_payment_information_more' => 'To complete a payment we need more details about you.', - 'required_client_info_save_label' => 'We will save this, so you don\'t have to enter it next time.', - 'notification_credit_bounced' => 'We were unable to deliver Credit :invoice to :contact. \n :error', - 'notification_credit_bounced_subject' => 'Unable to deliver Credit :invoice', - 'save_payment_method_details' => 'Save payment method details', - 'new_card' => 'New card', - 'new_bank_account' => 'New bank account', - 'company_limit_reached' => 'Limit of :limit companies per account.', - 'credits_applied_validation' => 'Total credits applied cannot be MORE than total of invoices', - 'credit_number_taken' => 'Credit number already taken', - 'credit_not_found' => 'Credit not found', - 'invoices_dont_match_client' => 'Selected invoices are not from a single client', - 'duplicate_credits_submitted' => 'Duplicate credits submitted.', - 'duplicate_invoices_submitted' => 'Duplicate invoices submitted.', - 'credit_with_no_invoice' => 'You must have an invoice set when using a credit in a payment', - 'client_id_required' => 'Client id is required', - 'expense_number_taken' => 'Expense number already taken', - 'invoice_number_taken' => 'Invoice number already taken', - 'payment_id_required' => 'Payment `id` required.', - 'unable_to_retrieve_payment' => 'Unable to retrieve specified payment', - 'invoice_not_related_to_payment' => 'Invoice id :invoice is not related to this payment', - 'credit_not_related_to_payment' => 'Credit id :credit is not related to this payment', - 'max_refundable_invoice' => 'Attempting to refund more than allowed for invoice id :invoice, maximum refundable amount is :amount', - 'refund_without_invoices' => 'Attempting to refund a payment with invoices attached, please specify valid invoice/s to be refunded.', - 'refund_without_credits' => 'Attempting to refund a payment with credits attached, please specify valid credits/s to be refunded.', - 'max_refundable_credit' => 'Attempting to refund more than allowed for credit :credit, maximum refundable amount is :amount', - 'project_client_do_not_match' => 'Project client does not match entity client', - 'quote_number_taken' => 'Quote number already taken', - 'recurring_invoice_number_taken' => 'Recurring Invoice number :number already taken', - 'user_not_associated_with_account' => 'User not associated with this account', - 'amounts_do_not_balance' => 'Amounts do not balance correctly.', - 'insufficient_applied_amount_remaining' => 'Insufficient applied amount remaining to cover payment.', - 'insufficient_credit_balance' => 'Insufficient balance on credit.', - 'one_or_more_invoices_paid' => 'One or more of these invoices have been paid', - 'invoice_cannot_be_refunded' => 'Invoice id :number cannot be refunded', - 'attempted_refund_failed' => 'Attempting to refund :amount only :refundable_amount available for refund', - 'user_not_associated_with_this_account' => 'This user is unable to be attached to this company. Perhaps they have already registered a user on another account?', - 'migration_completed' => 'Migration completed', - 'migration_completed_description' => 'Your migration has completed, please review your data after logging in.', - 'api_404' => '404 | Nothing to see here!', - 'large_account_update_parameter' => 'Cannot load a large account without a updated_at parameter', - 'no_backup_exists' => 'No backup exists for this activity', - 'company_user_not_found' => 'Company User record not found', - 'no_credits_found' => 'No credits found.', - 'action_unavailable' => 'The requested action :action is not available.', - 'no_documents_found' => 'No Documents Found', - 'no_group_settings_found' => 'No group settings found', - 'access_denied' => 'Insufficient privileges to access/modify this resource', - 'invoice_cannot_be_marked_paid' => 'Invoice cannot be marked as paid', - 'invoice_license_or_environment' => 'Invalid license, or invalid environment :environment', - 'route_not_available' => 'Route not available', - 'invalid_design_object' => 'Invalid custom design object', - 'quote_not_found' => 'Quote/s not found', - 'quote_unapprovable' => 'Unable to approve this quote as it has expired.', - 'scheduler_has_run' => 'Scheduler has run', - 'scheduler_has_never_run' => 'Scheduler has never run', - 'self_update_not_available' => 'Self update not available on this system.', - 'user_detached' => 'User detached from company', - 'create_webhook_failure' => 'Failed to create Webhook', - 'payment_message_extended' => 'Thank you for your payment of :amount for :invoice', - 'online_payments_minimum_note' => 'Note: Online payments are supported only if amount is bigger than $1 or currency equivalent.', - 'payment_token_not_found' => 'Payment token not found, please try again. If an issue still persist, try with another payment method', - 'vendor_address1' => 'Vendor Street', - 'vendor_address2' => 'Vendor Apt/Suite', - 'partially_unapplied' => 'Partially Unapplied', - 'select_a_gmail_user' => 'Please select a user authenticated with Gmail', - 'list_long_press' => 'List Long Press', - 'show_actions' => 'Show Actions', - 'start_multiselect' => 'Start Multiselect', - 'email_sent_to_confirm_email' => 'An email has been sent to confirm the email address', - 'converted_paid_to_date' => 'Converted Paid to Date', - 'converted_credit_balance' => 'Converted Credit Balance', - 'converted_total' => 'Converted Total', - 'reply_to_name' => 'Reply-To Name', - 'payment_status_-2' => 'Partially Unapplied', - 'color_theme' => 'Color Theme', - 'start_migration' => 'Start Migration', - 'recurring_cancellation_request' => 'Request for recurring invoice cancellation from :contact', - 'recurring_cancellation_request_body' => ':contact from Client :client requested to cancel Recurring Invoice :invoice', - 'hello' => 'Hello', - 'group_documents' => 'Group documents', - 'quote_approval_confirmation_label' => 'Are you sure you want to approve this quote?', - 'migration_select_company_label' => 'Select companies to migrate', - 'force_migration' => 'Force migration', - 'require_password_with_social_login' => 'Require Password with Social Login', - 'stay_logged_in' => 'Stay Logged In', - 'session_about_to_expire' => 'Warning: Your session is about to expire', - 'count_hours' => ':count Hours', - 'count_day' => '1 Day', - 'count_days' => ':count Days', - 'web_session_timeout' => 'Web Session Timeout', - 'security_settings' => 'Security Settings', - 'resend_email' => 'Resend Email', - 'confirm_your_email_address' => 'Please confirm your email address', - 'freshbooks' => 'FreshBooks', - 'invoice2go' => 'Invoice2go', - 'invoicely' => 'Invoicely', - 'waveaccounting' => 'Wave Accounting', - 'zoho' => 'Zoho', - 'accounting' => 'Accounting', - 'required_files_missing' => 'Please provide all CSVs.', - 'migration_auth_label' => 'Let\'s continue by authenticating.', - 'api_secret' => 'API secret', - 'migration_api_secret_notice' => 'You can find API_SECRET in the .env file or Invoice Ninja v5. If property is missing, leave field blank.', - 'billing_coupon_notice' => 'Your discount will be applied on the checkout.', - 'use_last_email' => 'Use last email', - 'activate_company' => 'Activate Company', - 'activate_company_help' => 'Enable emails, recurring invoices and notifications', - 'an_error_occurred_try_again' => 'An error occurred, please try again', - 'please_first_set_a_password' => 'Please first set a password', - 'changing_phone_disables_two_factor' => 'Warning: Changing your phone number will disable 2FA', - 'help_translate' => 'Help Translate', - 'please_select_a_country' => 'Please select a country', - 'disabled_two_factor' => 'Successfully disabled 2FA', - 'connected_google' => 'Successfully connected account', - 'disconnected_google' => 'Successfully disconnected account', - 'delivered' => 'Delivered', - 'spam' => 'Spam', - 'view_docs' => 'View Docs', - 'enter_phone_to_enable_two_factor' => 'Please provide a mobile phone number to enable two factor authentication', - 'send_sms' => 'Send SMS', - 'sms_code' => 'SMS Code', - 'connect_google' => 'Connect Google', - 'disconnect_google' => 'Disconnect Google', - 'disable_two_factor' => 'Disable Two Factor', - 'invoice_task_datelog' => 'Invoice Task Datelog', - 'invoice_task_datelog_help' => 'Add date details to the invoice line items', - 'promo_code' => 'Promo code', - 'recurring_invoice_issued_to' => 'Recurring invoice issued to', - 'subscription' => 'Subscription', - 'new_subscription' => 'New Subscription', - 'deleted_subscription' => 'Successfully deleted subscription', - 'removed_subscription' => 'Successfully removed subscription', - 'restored_subscription' => 'Successfully restored subscription', - 'search_subscription' => 'Search 1 Subscription', - 'search_subscriptions' => 'Search :count Subscriptions', - 'subdomain_is_not_available' => 'Subdomain is not available', - 'connect_gmail' => 'Connect Gmail', - 'disconnect_gmail' => 'Disconnect Gmail', - 'connected_gmail' => 'Successfully connected Gmail', - 'disconnected_gmail' => 'Successfully disconnected Gmail', - 'update_fail_help' => 'Changes to the codebase may be blocking the update, you can run this command to discard the changes:', - 'client_id_number' => 'Client ID Number', - 'count_minutes' => ':count Minutes', - 'password_timeout' => 'Password Timeout', - 'shared_invoice_credit_counter' => 'Share Invoice/Credit Counter', + 'next' => 'Next', + 'next_step' => 'Next step', + 'notification_credit_sent_subject' => 'Credit :invoice was sent to :client', + 'notification_credit_viewed_subject' => 'Credit :invoice was viewed by :client', + 'notification_credit_sent' => 'The following client :client was emailed Credit :invoice for :amount.', + 'notification_credit_viewed' => 'The following client :client viewed Credit :credit for :amount.', + 'reset_password_text' => 'Enter your email to reset your password.', + 'password_reset' => 'Password reset', + 'account_login_text' => 'Welcome! Glad to see you.', + 'request_cancellation' => 'Request cancellation', + 'delete_payment_method' => 'Delete Payment Method', + 'about_to_delete_payment_method' => 'You are about to delete the payment method.', + 'action_cant_be_reversed' => 'Action can\'t be reversed', + 'profile_updated_successfully' => 'The profile has been updated successfully.', + 'currency_ethiopian_birr' => 'Ethiopian Birr', + 'client_information_text' => 'Use a permanent address where you can receive mail.', + 'status_id' => 'Invoice Status', + 'email_already_register' => 'This email is already linked to an account', + 'locations' => 'Locations', + 'freq_indefinitely' => 'Indefinitely', + 'cycles_remaining' => 'Cycles remaining', + 'i_understand_delete' => 'I understand, delete', + 'download_files' => 'Download Files', + 'download_timeframe' => 'Use this link to download your files, the link will expire in 1 hour.', + 'new_signup' => 'New Signup', + 'new_signup_text' => 'A new account has been created by :user - :email - from IP address: :ip', + 'notification_payment_paid_subject' => 'Payment was made by :client', + 'notification_partial_payment_paid_subject' => 'Partial payment was made by :client', + 'notification_payment_paid' => 'A payment of :amount was made by client :client towards :invoice', + 'notification_partial_payment_paid' => 'A partial payment of :amount was made by client :client towards :invoice', + 'notification_bot' => 'Notification Bot', + 'invoice_number_placeholder' => 'Invoice # :invoice', + 'entity_number_placeholder' => ':entity # :entity_number', + 'email_link_not_working' => 'If the button above isn\'t working for you, please click on the link', + 'display_log' => 'Display Log', + 'send_fail_logs_to_our_server' => 'Report errors in realtime', + 'setup' => 'Setup', + 'quick_overview_statistics' => 'Quick overview & statistics', + 'update_your_personal_info' => 'Update your personal information', + 'name_website_logo' => 'Name, website & logo', + 'make_sure_use_full_link' => 'Make sure you use full link to your site', + 'personal_address' => 'Personal address', + 'enter_your_personal_address' => 'Enter your personal address', + 'enter_your_shipping_address' => 'Enter your shipping address', + 'list_of_invoices' => 'List of invoices', + 'with_selected' => 'With selected', + 'invoice_still_unpaid' => 'This invoice is still not paid. Click the button to complete the payment', + 'list_of_recurring_invoices' => 'List of recurring invoices', + 'details_of_recurring_invoice' => 'Here are some details about recurring invoice', + 'cancellation' => 'Cancellation', + 'about_cancellation' => 'In case you want to stop the recurring invoice, please click to request the cancellation.', + 'cancellation_warning' => 'Warning! You are requesting a cancellation of this service. Your service may be cancelled with no further notification to you.', + 'cancellation_pending' => 'Cancellation pending, we\'ll be in touch!', + 'list_of_payments' => 'List of payments', + 'payment_details' => 'Details of the payment', + 'list_of_payment_invoices' => 'List of invoices affected by the payment', + 'list_of_payment_methods' => 'List of payment methods', + 'payment_method_details' => 'Details of payment method', + 'permanently_remove_payment_method' => 'Permanently remove this payment method.', + 'warning_action_cannot_be_reversed' => 'Warning! This action can not be reversed!', + 'confirmation' => 'Confirmation', + 'list_of_quotes' => 'Quotes', + 'waiting_for_approval' => 'Waiting for approval', + 'quote_still_not_approved' => 'This quote is still not approved', + 'list_of_credits' => 'Credits', + 'required_extensions' => 'Required extensions', + 'php_version' => 'PHP version', + 'writable_env_file' => 'Writable .env file', + 'env_not_writable' => '.env file is not writable by the current user.', + 'minumum_php_version' => 'Minimum PHP version', + 'satisfy_requirements' => 'Make sure all requirements are satisfied.', + 'oops_issues' => 'Oops, something does not look right!', + 'open_in_new_tab' => 'Open in new tab', + 'complete_your_payment' => 'Complete payment', + 'authorize_for_future_use' => 'Authorize payment method for future use', + 'page' => 'Page', + 'per_page' => 'Per page', + 'of' => 'Of', + 'view_credit' => 'View Credit', + 'to_view_entity_password' => 'To view the :entity you need to enter password.', + 'showing_x_of' => 'Showing :first to :last out of :total results', + 'no_results' => 'No results found.', + 'payment_failed_subject' => 'Payment failed for Client :client', + 'payment_failed_body' => 'A payment made by client :client failed with message :message', + 'register' => 'Register', + 'register_label' => 'Create your account in seconds', + 'password_confirmation' => 'Confirm your password', + 'verification' => 'Verification', + 'complete_your_bank_account_verification' => 'Before using a bank account it must be verified.', + 'checkout_com' => 'Checkout.com', + 'footer_label' => 'Copyright © :year :company.', + 'credit_card_invalid' => 'Provided credit card number is not valid.', + 'month_invalid' => 'Provided month is not valid.', + 'year_invalid' => 'Provided year is not valid.', + 'https_required' => 'HTTPS is required, form will fail', + 'if_you_need_help' => 'If you need help you can post to our', + 'update_password_on_confirm' => 'After updating password, your account will be confirmed.', + 'bank_account_not_linked' => 'To pay with a bank account, first you have to add it as payment method.', + 'application_settings_label' => 'Let\'s store basic information about your Invoice Ninja!', + 'recommended_in_production' => 'Highly recommended in production', + 'enable_only_for_development' => 'Enable only for development', + 'test_pdf' => 'Test PDF', + 'checkout_authorize_label' => 'Checkout.com can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Store credit card details" during payment process.', + 'sofort_authorize_label' => 'Bank account (SOFORT) can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Store payment details" during payment process.', + 'node_status' => 'Node status', + 'npm_status' => 'NPM status', + 'node_status_not_found' => 'I could not find Node anywhere. Is it installed?', + 'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?', + 'locked_invoice' => 'This invoice is locked and unable to be modified', + 'downloads' => 'Downloads', + 'resource' => 'Resource', + 'document_details' => 'Details about the document', + 'hash' => 'Hash', + 'resources' => 'Resources', + 'allowed_file_types' => 'Allowed file types:', + 'common_codes' => 'Common codes and their meanings', + 'payment_error_code_20087' => '20087: Bad Track Data (invalid CVV and/or expiry date)', + 'download_selected' => 'Download selected', + 'to_pay_invoices' => 'To pay invoices, you have to', + 'add_payment_method_first' => 'add payment method', + 'no_items_selected' => 'No items selected.', + 'payment_due' => 'Payment due', + 'account_balance' => 'Account Balance', + 'thanks' => 'Thanks', + 'minimum_required_payment' => 'Minimum required payment is :amount', + 'under_payments_disabled' => 'Company doesn\'t support underpayments.', + 'over_payments_disabled' => 'Company doesn\'t support overpayments.', + 'saved_at' => 'Saved at :time', + 'credit_payment' => 'Credit applied to Invoice :invoice_number', + 'credit_subject' => 'New credit :number from :account', + 'credit_message' => 'To view your credit for :amount, click the link below.', + 'payment_type_Crypto' => 'Cryptocurrency', + 'payment_type_Credit' => 'Credit', + 'store_for_future_use' => 'Store for future use', + 'pay_with_credit' => 'Pay with credit', + 'payment_method_saving_failed' => 'Payment method can\'t be saved for future use.', + 'pay_with' => 'Pay with', + 'n/a' => 'N/A', + 'by_clicking_next_you_accept_terms' => 'By clicking "Next step" you accept terms.', + 'not_specified' => 'Not specified', + 'before_proceeding_with_payment_warning' => 'Before proceeding with payment, you have to fill following fields', + 'after_completing_go_back_to_previous_page' => 'After completing, go back to previous page.', + 'pay' => 'Pay', + 'instructions' => 'Instructions', + 'notification_invoice_reminder1_sent_subject' => 'Reminder 1 for Invoice :invoice was sent to :client', + 'notification_invoice_reminder2_sent_subject' => 'Reminder 2 for Invoice :invoice was sent to :client', + 'notification_invoice_reminder3_sent_subject' => 'Reminder 3 for Invoice :invoice was sent to :client', + 'notification_invoice_custom_sent_subject' => 'Custom reminder for Invoice :invoice was sent to :client', + 'notification_invoice_reminder_endless_sent_subject' => 'Endless reminder for Invoice :invoice was sent to :client', + 'assigned_user' => 'Assigned User', + 'setup_steps_notice' => 'To proceed to next step, make sure you test each section.', + 'setup_phantomjs_note' => 'Note about Phantom JS. Read more.', + 'minimum_payment' => 'Minimum Payment', + 'no_action_provided' => 'No action provided. If you believe this is wrong, please contact the support.', + 'no_payable_invoices_selected' => 'No payable invoices selected. Make sure you are not trying to pay draft invoice or invoice with zero balance due.', + 'required_payment_information' => 'Required payment details', + 'required_payment_information_more' => 'To complete a payment we need more details about you.', + 'required_client_info_save_label' => 'We will save this, so you don\'t have to enter it next time.', + 'notification_credit_bounced' => 'We were unable to deliver Credit :invoice to :contact. \n :error', + 'notification_credit_bounced_subject' => 'Unable to deliver Credit :invoice', + 'save_payment_method_details' => 'Save payment method details', + 'new_card' => 'New card', + 'new_bank_account' => 'New bank account', + 'company_limit_reached' => 'Limit of :limit companies per account.', + 'credits_applied_validation' => 'Total credits applied cannot be MORE than total of invoices', + 'credit_number_taken' => 'Credit number already taken', + 'credit_not_found' => 'Credit not found', + 'invoices_dont_match_client' => 'Selected invoices are not from a single client', + 'duplicate_credits_submitted' => 'Duplicate credits submitted.', + 'duplicate_invoices_submitted' => 'Duplicate invoices submitted.', + 'credit_with_no_invoice' => 'You must have an invoice set when using a credit in a payment', + 'client_id_required' => 'Client id is required', + 'expense_number_taken' => 'Expense number already taken', + 'invoice_number_taken' => 'Invoice number already taken', + 'payment_id_required' => 'Payment `id` required.', + 'unable_to_retrieve_payment' => 'Unable to retrieve specified payment', + 'invoice_not_related_to_payment' => 'Invoice id :invoice is not related to this payment', + 'credit_not_related_to_payment' => 'Credit id :credit is not related to this payment', + 'max_refundable_invoice' => 'Attempting to refund more than allowed for invoice id :invoice, maximum refundable amount is :amount', + 'refund_without_invoices' => 'Attempting to refund a payment with invoices attached, please specify valid invoice/s to be refunded.', + 'refund_without_credits' => 'Attempting to refund a payment with credits attached, please specify valid credits/s to be refunded.', + 'max_refundable_credit' => 'Attempting to refund more than allowed for credit :credit, maximum refundable amount is :amount', + 'project_client_do_not_match' => 'Project client does not match entity client', + 'quote_number_taken' => 'Quote number already taken', + 'recurring_invoice_number_taken' => 'Recurring Invoice number :number already taken', + 'user_not_associated_with_account' => 'User not associated with this account', + 'amounts_do_not_balance' => 'Amounts do not balance correctly.', + 'insufficient_applied_amount_remaining' => 'Insufficient applied amount remaining to cover payment.', + 'insufficient_credit_balance' => 'Insufficient balance on credit.', + 'one_or_more_invoices_paid' => 'One or more of these invoices have been paid', + 'invoice_cannot_be_refunded' => 'Invoice id :number cannot be refunded', + 'attempted_refund_failed' => 'Attempting to refund :amount only :refundable_amount available for refund', + 'user_not_associated_with_this_account' => 'This user is unable to be attached to this company. Perhaps they have already registered a user on another account?', + 'migration_completed' => 'Migration completed', + 'migration_completed_description' => 'Your migration has completed, please review your data after logging in.', + 'api_404' => '404 | Nothing to see here!', + 'large_account_update_parameter' => 'Cannot load a large account without a updated_at parameter', + 'no_backup_exists' => 'No backup exists for this activity', + 'company_user_not_found' => 'Company User record not found', + 'no_credits_found' => 'No credits found.', + 'action_unavailable' => 'The requested action :action is not available.', + 'no_documents_found' => 'No Documents Found', + 'no_group_settings_found' => 'No group settings found', + 'access_denied' => 'Insufficient privileges to access/modify this resource', + 'invoice_cannot_be_marked_paid' => 'Invoice cannot be marked as paid', + 'invoice_license_or_environment' => 'Invalid license, or invalid environment :environment', + 'route_not_available' => 'Route not available', + 'invalid_design_object' => 'Invalid custom design object', + 'quote_not_found' => 'Quote/s not found', + 'quote_unapprovable' => 'Unable to approve this quote as it has expired.', + 'scheduler_has_run' => 'Scheduler has run', + 'scheduler_has_never_run' => 'Scheduler has never run', + 'self_update_not_available' => 'Self update not available on this system.', + 'user_detached' => 'User detached from company', + 'create_webhook_failure' => 'Failed to create Webhook', + 'payment_message_extended' => 'Thank you for your payment of :amount for :invoice', + 'online_payments_minimum_note' => 'Note: Online payments are supported only if amount is bigger than $1 or currency equivalent.', + 'payment_token_not_found' => 'Payment token not found, please try again. If an issue still persist, try with another payment method', + 'vendor_address1' => 'Vendor Street', + 'vendor_address2' => 'Vendor Apt/Suite', + 'partially_unapplied' => 'Partially Unapplied', + 'select_a_gmail_user' => 'Please select a user authenticated with Gmail', + 'list_long_press' => 'List Long Press', + 'show_actions' => 'Show Actions', + 'start_multiselect' => 'Start Multiselect', + 'email_sent_to_confirm_email' => 'An email has been sent to confirm the email address', + 'converted_paid_to_date' => 'Converted Paid to Date', + 'converted_credit_balance' => 'Converted Credit Balance', + 'converted_total' => 'Converted Total', + 'reply_to_name' => 'Reply-To Name', + 'payment_status_-2' => 'Partially Unapplied', + 'color_theme' => 'Color Theme', + 'start_migration' => 'Start Migration', + 'recurring_cancellation_request' => 'Request for recurring invoice cancellation from :contact', + 'recurring_cancellation_request_body' => ':contact from Client :client requested to cancel Recurring Invoice :invoice', + 'hello' => 'Hello', + 'group_documents' => 'Group documents', + 'quote_approval_confirmation_label' => 'Are you sure you want to approve this quote?', + 'migration_select_company_label' => 'Select companies to migrate', + 'force_migration' => 'Force migration', + 'require_password_with_social_login' => 'Require Password with Social Login', + 'stay_logged_in' => 'Stay Logged In', + 'session_about_to_expire' => 'Warning: Your session is about to expire', + 'count_hours' => ':count Hours', + 'count_day' => '1 Day', + 'count_days' => ':count Days', + 'web_session_timeout' => 'Web Session Timeout', + 'security_settings' => 'Security Settings', + 'resend_email' => 'Resend Email', + 'confirm_your_email_address' => 'Please confirm your email address', + 'freshbooks' => 'FreshBooks', + 'invoice2go' => 'Invoice2go', + 'invoicely' => 'Invoicely', + 'waveaccounting' => 'Wave Accounting', + 'zoho' => 'Zoho', + 'accounting' => 'Accounting', + 'required_files_missing' => 'Please provide all CSVs.', + 'migration_auth_label' => 'Let\'s continue by authenticating.', + 'api_secret' => 'API secret', + 'migration_api_secret_notice' => 'You can find API_SECRET in the .env file or Invoice Ninja v5. If property is missing, leave field blank.', + 'billing_coupon_notice' => 'Your discount will be applied on the checkout.', + 'use_last_email' => 'Use last email', + 'activate_company' => 'Activate Company', + 'activate_company_help' => 'Enable emails, recurring invoices and notifications', + 'an_error_occurred_try_again' => 'An error occurred, please try again', + 'please_first_set_a_password' => 'Please first set a password', + 'changing_phone_disables_two_factor' => 'Warning: Changing your phone number will disable 2FA', + 'help_translate' => 'Help Translate', + 'please_select_a_country' => 'Please select a country', + 'disabled_two_factor' => 'Successfully disabled 2FA', + 'connected_google' => 'Successfully connected account', + 'disconnected_google' => 'Successfully disconnected account', + 'delivered' => 'Delivered', + 'spam' => 'Spam', + 'view_docs' => 'View Docs', + 'enter_phone_to_enable_two_factor' => 'Please provide a mobile phone number to enable two factor authentication', + 'send_sms' => 'Send SMS', + 'sms_code' => 'SMS Code', + 'connect_google' => 'Connect Google', + 'disconnect_google' => 'Disconnect Google', + 'disable_two_factor' => 'Disable Two Factor', + 'invoice_task_datelog' => 'Invoice Task Datelog', + 'invoice_task_datelog_help' => 'Add date details to the invoice line items', + 'promo_code' => 'Promo code', + 'recurring_invoice_issued_to' => 'Recurring invoice issued to', + 'subscription' => 'Subscription', + 'new_subscription' => 'New Subscription', + 'deleted_subscription' => 'Successfully deleted subscription', + 'removed_subscription' => 'Successfully removed subscription', + 'restored_subscription' => 'Successfully restored subscription', + 'search_subscription' => 'Search 1 Subscription', + 'search_subscriptions' => 'Search :count Subscriptions', + 'subdomain_is_not_available' => 'Subdomain is not available', + 'connect_gmail' => 'Connect Gmail', + 'disconnect_gmail' => 'Disconnect Gmail', + 'connected_gmail' => 'Successfully connected Gmail', + 'disconnected_gmail' => 'Successfully disconnected Gmail', + 'update_fail_help' => 'Changes to the codebase may be blocking the update, you can run this command to discard the changes:', + 'client_id_number' => 'Client ID Number', + 'count_minutes' => ':count Minutes', + 'password_timeout' => 'Password Timeout', + 'shared_invoice_credit_counter' => 'Share Invoice/Credit Counter', 'activity_80' => ':user created subscription :subscription', 'activity_81' => ':user updated subscription :subscription', 'activity_82' => ':user archived subscription :subscription', @@ -4891,6 +4893,7 @@ $lang = array( 'email_alignment' => 'Email Alignment', 'pdf_preview_location' => 'PDF Preview Location', 'mailgun' => 'Mailgun', + 'brevo' => 'Brevo', 'postmark' => 'Postmark', 'microsoft' => 'Microsoft', 'click_plus_to_create_record' => 'Click + to create a record', diff --git a/openapi/components/schemas/company_settings.yaml b/openapi/components/schemas/company_settings.yaml index 15dc5bf8cd38..2ee34f675f99 100644 --- a/openapi/components/schemas/company_settings.yaml +++ b/openapi/components/schemas/company_settings.yaml @@ -1,842 +1,842 @@ - CompanySettings: - required: +CompanySettings: + required: - currency_id - properties: + properties: currency_id: - description: 'The default currency id' - type: string - example: true + description: "The default currency id" + type: string + example: true timezone_id: - description: 'The timezone id' - type: string - example: '15' + description: "The timezone id" + type: string + example: "15" date_format_id: - description: 'The date format id' - type: string - example: '15' + description: "The date format id" + type: string + example: "15" military_time: - description: 'Toggles 12/24 hour time' - type: boolean - example: true + description: "Toggles 12/24 hour time" + type: boolean + example: true language_id: - description: 'The language id' - type: string - example: '1' + description: "The language id" + type: string + example: "1" show_currency_code: - description: 'Toggles whether the currency symbol or code is shown' - type: boolean - example: true + description: "Toggles whether the currency symbol or code is shown" + type: boolean + example: true payment_terms: - description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' - type: integer - example: '1' + description: "-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days" + type: integer + example: "1" company_gateway_ids: - description: 'A commad separate list of available gateways' - type: string - example: '1,2,3,4' + description: "A commad separate list of available gateways" + type: string + example: "1,2,3,4" custom_value1: - description: 'A Custom Label' - type: string - example: 'Custom Label' + description: "A Custom Label" + type: string + example: "Custom Label" custom_value2: - description: 'A Custom Label' - type: string - example: 'Custom Label' + description: "A Custom Label" + type: string + example: "Custom Label" custom_value3: - description: 'A Custom Label' - type: string - example: 'Custom Label' + description: "A Custom Label" + type: string + example: "Custom Label" custom_value4: - description: 'A Custom Label' - type: string - example: 'Custom Label' + description: "A Custom Label" + type: string + example: "Custom Label" default_task_rate: - description: 'The default task rate' - type: number - format: float - example: '10.00' + description: "The default task rate" + type: number + format: float + example: "10.00" send_reminders: - description: 'Toggles whether reminders are sent' - type: boolean - example: true + description: "Toggles whether reminders are sent" + type: boolean + example: true enable_client_portal_tasks: - description: 'Show/hide the tasks panel in the client portal' - type: boolean - example: true + description: "Show/hide the tasks panel in the client portal" + type: boolean + example: true email_style: - description: 'options include plain,light,dark,custom' - type: string - example: light + description: "options include plain,light,dark,custom" + type: string + example: light reply_to_email: - description: 'The reply to email address' - type: string - example: email@gmail.com + description: "The reply to email address" + type: string + example: email@gmail.com bcc_email: - description: 'A comma separate list of BCC emails' - type: string - example: 'email@gmail.com, contact@gmail.com' + description: "A comma separate list of BCC emails" + type: string + example: "email@gmail.com, contact@gmail.com" pdf_email_attachment: - description: 'Toggles whether to attach PDF as attachment' - type: boolean - example: true + description: "Toggles whether to attach PDF as attachment" + type: boolean + example: true ubl_email_attachment: - description: 'Toggles whether to attach UBL as attachment' - type: boolean - example: true + description: "Toggles whether to attach UBL as attachment" + type: boolean + example: true email_style_custom: - description: 'The custom template' - type: string - example: '' + description: "The custom template" + type: string + example: "" counter_number_applied: - description: 'enum when the invoice number counter is set, ie when_saved, when_sent, when_paid' - type: string - example: when_sent + description: "enum when the invoice number counter is set, ie when_saved, when_sent, when_paid" + type: string + example: when_sent quote_number_applied: - description: 'enum when the quote number counter is set, ie when_saved, when_sent' - type: string - example: when_sent + description: "enum when the quote number counter is set, ie when_saved, when_sent" + type: string + example: when_sent custom_message_dashboard: - description: 'A custom message which is displayed on the dashboard' - type: string - example: 'Please pay invoices immediately' + description: "A custom message which is displayed on the dashboard" + type: string + example: "Please pay invoices immediately" custom_message_unpaid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a unpaid invoice.' - type: string - example: 'Please pay invoices immediately' + description: "A custom message which is displayed in the client portal when a client is viewing a unpaid invoice." + type: string + example: "Please pay invoices immediately" custom_message_paid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a paid invoice.' - type: string - example: 'Thanks for paying this invoice!' + description: "A custom message which is displayed in the client portal when a client is viewing a paid invoice." + type: string + example: "Thanks for paying this invoice!" custom_message_unapproved_quote: - description: 'A custom message which is displayed in the client portal when a client is viewing a unapproved quote.' - type: string - example: 'Please approve quote' + description: "A custom message which is displayed in the client portal when a client is viewing a unapproved quote." + type: string + example: "Please approve quote" lock_invoices: - description: 'Toggles whether invoices are locked once sent and cannot be modified further' - type: boolean - example: true + description: "Toggles whether invoices are locked once sent and cannot be modified further" + type: boolean + example: true auto_archive_invoice: - description: 'Toggles whether a invoice is archived immediately following payment' - type: boolean - example: true + description: "Toggles whether a invoice is archived immediately following payment" + type: boolean + example: true auto_archive_quote: - description: 'Toggles whether a quote is archived after being converted to a invoice' - type: boolean - example: true + description: "Toggles whether a quote is archived after being converted to a invoice" + type: boolean + example: true auto_convert_quote: - description: 'Toggles whether a quote is converted to a invoice when approved' - type: boolean - example: true + description: "Toggles whether a quote is converted to a invoice when approved" + type: boolean + example: true inclusive_taxes: - description: 'Boolean flag determining whether inclusive or exclusive taxes are used' - type: boolean - example: true + description: "Boolean flag determining whether inclusive or exclusive taxes are used" + type: boolean + example: true translations: - description: 'JSON payload of customized translations' - type: object - example: '' + description: "JSON payload of customized translations" + type: object + example: "" task_number_pattern: - description: 'Allows customisation of the task number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the task number pattern" + type: string + example: "{$year}-{$counter}" task_number_counter: - description: 'The incrementing counter for tasks' - type: integer - example: '1' + description: "The incrementing counter for tasks" + type: integer + example: "1" reminder_send_time: - description: 'Time from UTC +0 when the email will be sent to the client' - type: integer - example: '32400' + description: "Time from UTC +0 when the email will be sent to the client" + type: integer + example: "32400" expense_number_pattern: - description: 'Allows customisation of the expense number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the expense number pattern" + type: string + example: "{$year}-{$counter}" expense_number_counter: - description: 'The incrementing counter for expenses' - type: integer - example: '1' + description: "The incrementing counter for expenses" + type: integer + example: "1" vendor_number_pattern: - description: 'Allows customisation of the vendor number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the vendor number pattern" + type: string + example: "{$year}-{$counter}" vendor_number_counter: - description: 'The incrementing counter for vendors' - type: integer - example: '1' + description: "The incrementing counter for vendors" + type: integer + example: "1" ticket_number_pattern: - description: 'Allows customisation of the ticket number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the ticket number pattern" + type: string + example: "{$year}-{$counter}" ticket_number_counter: - description: 'The incrementing counter for tickets' - type: integer - example: '1' + description: "The incrementing counter for tickets" + type: integer + example: "1" payment_number_pattern: - description: 'Allows customisation of the payment number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the payment number pattern" + type: string + example: "{$year}-{$counter}" payment_number_counter: - description: 'The incrementing counter for payments' - type: integer - example: '1' + description: "The incrementing counter for payments" + type: integer + example: "1" invoice_number_pattern: - description: 'Allows customisation of the invoice number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the invoice number pattern" + type: string + example: "{$year}-{$counter}" invoice_number_counter: - description: 'The incrementing counter for invoices' - type: integer - example: '1' + description: "The incrementing counter for invoices" + type: integer + example: "1" quote_number_pattern: - description: 'Allows customisation of the quote number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the quote number pattern" + type: string + example: "{$year}-{$counter}" quote_number_counter: - description: 'The incrementing counter for quotes' - type: integer - example: '1' + description: "The incrementing counter for quotes" + type: integer + example: "1" client_number_pattern: - description: 'Allows customisation of the client number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the client number pattern" + type: string + example: "{$year}-{$counter}" client_number_counter: - description: 'The incrementing counter for clients' - type: integer - example: '1' + description: "The incrementing counter for clients" + type: integer + example: "1" credit_number_pattern: - description: 'Allows customisation of the credit number pattern' - type: string - example: '{$year}-{$counter}' + description: "Allows customisation of the credit number pattern" + type: string + example: "{$year}-{$counter}" credit_number_counter: - description: 'The incrementing counter for credits' - type: integer - example: '1' + description: "The incrementing counter for credits" + type: integer + example: "1" recurring_invoice_number_prefix: - description: 'This string is prepended to the recurring invoice number' - type: string - example: R + description: "This string is prepended to the recurring invoice number" + type: string + example: R reset_counter_frequency_id: - description: 'CONSTANT which is used to apply the frequency which the counters are reset' - type: integer - example: '1' + description: "CONSTANT which is used to apply the frequency which the counters are reset" + type: integer + example: "1" reset_counter_date: - description: 'The explicit date which is used to reset counters' - type: string - example: '2019-01-01' + description: "The explicit date which is used to reset counters" + type: string + example: "2019-01-01" counter_padding: - description: 'Pads the counter with leading zeros' - type: integer - example: '1' + description: "Pads the counter with leading zeros" + type: integer + example: "1" shared_invoice_quote_counter: - description: 'Flags whether to share the counter for invoices and quotes' - type: boolean - example: true + description: "Flags whether to share the counter for invoices and quotes" + type: boolean + example: true update_products: - description: 'Determines if client fields are updated from third party APIs' - type: boolean - example: true + description: "Determines if client fields are updated from third party APIs" + type: boolean + example: true convert_products: - description: '' - type: boolean - example: true + description: "" + type: boolean + example: true fill_products: - description: 'Automatically fill products based on product_key' - type: boolean - example: true + description: "Automatically fill products based on product_key" + type: boolean + example: true invoice_terms: - description: 'The default invoice terms' - type: string - example: 'Invoice Terms are...' + description: "The default invoice terms" + type: string + example: "Invoice Terms are..." quote_terms: - description: 'The default quote terms' - type: string - example: 'Quote Terms are...' + description: "The default quote terms" + type: string + example: "Quote Terms are..." invoice_taxes: - description: 'Taxes can be applied to the invoice' - type: number - example: '1' + description: "Taxes can be applied to the invoice" + type: number + example: "1" invoice_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' + description: "The default design id (invoice, quote etc)" + type: string + example: "1" quote_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' + description: "The default design id (invoice, quote etc)" + type: string + example: "1" invoice_footer: - description: 'The default invoice footer' - type: string - example: '1' + description: "The default invoice footer" + type: string + example: "1" invoice_labels: - description: 'JSON string of invoice labels' - type: string - example: '1' + description: "JSON string of invoice labels" + type: string + example: "1" tax_rate1: - description: 'The tax rate (float)' - type: number - example: '10' + description: "The tax rate (float)" + type: number + example: "10" tax_name1: - description: 'The tax name' - type: string - example: GST + description: "The tax name" + type: string + example: GST tax_rate2: - description: 'The tax rate (float)' - type: number - example: '10' + description: "The tax rate (float)" + type: number + example: "10" tax_name2: - description: 'The tax name' - type: string - example: GST + description: "The tax name" + type: string + example: GST tax_rate3: - description: 'The tax rate (float)' - type: number - example: '10' + description: "The tax rate (float)" + type: number + example: "10" tax_name3: - description: 'The tax name' - type: string - example: GST + description: "The tax name" + type: string + example: GST payment_type_id: - description: 'The default payment type id' - type: string - example: '1' + description: "The default payment type id" + type: string + example: "1" custom_fields: - description: 'JSON string of custom fields' - type: string - example: '{}' + description: "JSON string of custom fields" + type: string + example: "{}" email_footer: - description: 'The default email footer' - type: string - example: 'A default email footer' + description: "The default email footer" + type: string + example: "A default email footer" email_sending_method: - description: 'The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, office365' - type: string - example: default + description: "The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, client_brevo, office365" + type: string + example: default gmail_sending_user_id: - description: 'The hashed_id of the user account to send email from' - type: string - example: F76sd34D + description: "The hashed_id of the user account to send email from" + type: string + example: F76sd34D email_subject_invoice: - description: '' - type: string - example: 'Your Invoice Subject' + description: "" + type: string + example: "Your Invoice Subject" email_subject_quote: - description: '' - type: string - example: 'Your Quote Subject' + description: "" + type: string + example: "Your Quote Subject" email_subject_payment: - description: '' - type: string - example: 'Your Payment Subject' + description: "" + type: string + example: "Your Payment Subject" email_template_invoice: - description: 'The full template for invoice emails' - type: string - example: '' + description: "The full template for invoice emails" + type: string + example: "" email_template_quote: - description: 'The full template for quote emails' - type: string - example: '' + description: "The full template for quote emails" + type: string + example: "" email_template_payment: - description: 'The full template for payment emails' - type: string - example: '' + description: "The full template for payment emails" + type: string + example: "" email_subject_reminder1: - description: 'Email subject for Reminder' - type: string - example: '' + description: "Email subject for Reminder" + type: string + example: "" email_subject_reminder2: - description: 'Email subject for Reminder' - type: string - example: '' + description: "Email subject for Reminder" + type: string + example: "" email_subject_reminder3: - description: 'Email subject for Reminder' - type: string - example: '' + description: "Email subject for Reminder" + type: string + example: "" email_subject_reminder_endless: - description: 'Email subject for endless reminders' - type: string - example: '' + description: "Email subject for endless reminders" + type: string + example: "" email_template_reminder1: - description: 'The full template for Reminder 1' - type: string - example: '' + description: "The full template for Reminder 1" + type: string + example: "" email_template_reminder2: - description: 'The full template for Reminder 2' - type: string - example: '' + description: "The full template for Reminder 2" + type: string + example: "" email_template_reminder3: - description: 'The full template for Reminder 3' - type: string - example: '' + description: "The full template for Reminder 3" + type: string + example: "" email_template_reminder_endless: - description: 'The full template for enless reminders' - type: string - example: '' + description: "The full template for enless reminders" + type: string + example: "" enable_portal_password: - description: 'Toggles whether a password is required to log into the client portal' - type: boolean - example: true + description: "Toggles whether a password is required to log into the client portal" + type: boolean + example: true show_accept_invoice_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true show_accept_quote_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true require_invoice_signature: - description: 'Toggles whether a invoice signature is required' - type: boolean - example: true + description: "Toggles whether a invoice signature is required" + type: boolean + example: true require_quote_signature: - description: 'Toggles whether a quote signature is required' - type: boolean - example: true + description: "Toggles whether a quote signature is required" + type: boolean + example: true name: - description: 'The company name' - type: string - example: 'Acme Co' + description: "The company name" + type: string + example: "Acme Co" company_logo: - description: 'The company logo file' - type: object - example: logo.png + description: "The company logo file" + type: object + example: logo.png website: - description: 'The company website URL' - type: string - example: www.acme.com + description: "The company website URL" + type: string + example: www.acme.com address1: - description: 'The company address line 1' - type: string - example: 'Suite 888' + description: "The company address line 1" + type: string + example: "Suite 888" address2: - description: 'The company address line 2' - type: string - example: '5 Jimbo Way' + description: "The company address line 2" + type: string + example: "5 Jimbo Way" city: - description: 'The company city' - type: string - example: Sydney + description: "The company city" + type: string + example: Sydney state: - description: 'The company state' - type: string - example: Florisa + description: "The company state" + type: string + example: Florisa postal_code: - description: 'The company zip/postal code' - type: string - example: '90210' + description: "The company zip/postal code" + type: string + example: "90210" phone: - description: 'The company phone' - type: string - example: 555-213-3948 + description: "The company phone" + type: string + example: 555-213-3948 email: - description: 'The company email' - type: string - example: joe@acme.co + description: "The company email" + type: string + example: joe@acme.co country_id: - description: 'The country ID' - type: string - example: '1' + description: "The country ID" + type: string + example: "1" vat_number: - description: 'The company VAT/TAX ID number' - type: string - example: '32 120 377 720' + description: "The company VAT/TAX ID number" + type: string + example: "32 120 377 720" page_size: - description: 'The default page size' - type: string - example: A4 + description: "The default page size" + type: string + example: A4 font_size: - description: 'The font size' - type: number - example: '9' + description: "The font size" + type: number + example: "9" primary_font: - description: 'The primary font' - type: string - example: roboto + description: "The primary font" + type: string + example: roboto secondary_font: - description: 'The secondary font' - type: string - example: roboto + description: "The secondary font" + type: string + example: roboto hide_paid_to_date: - description: 'Flags whether to hide the paid to date field' - type: boolean - example: false + description: "Flags whether to hide the paid to date field" + type: boolean + example: false embed_documents: - description: 'Toggled whether to embed documents in the PDF' - type: boolean - example: false + description: "Toggled whether to embed documents in the PDF" + type: boolean + example: false all_pages_header: - description: 'The header for the PDF' - type: boolean - example: false + description: "The header for the PDF" + type: boolean + example: false all_pages_footer: - description: 'The footer for the PDF' - type: boolean - example: false + description: "The footer for the PDF" + type: boolean + example: false document_email_attachment: - description: 'Toggles whether to attach documents in the email' - type: boolean - example: false + description: "Toggles whether to attach documents in the email" + type: boolean + example: false enable_client_portal_password: - description: 'Toggles password protection of the client portal' - type: boolean - example: false + description: "Toggles password protection of the client portal" + type: boolean + example: false enable_email_markup: - description: 'Toggles the use of markdown in emails' - type: boolean - example: false + description: "Toggles the use of markdown in emails" + type: boolean + example: false enable_client_portal_dashboard: - description: 'Toggles whether the client dashboard is shown in the client portal' - type: boolean - example: false + description: "Toggles whether the client dashboard is shown in the client portal" + type: boolean + example: false enable_client_portal: - description: 'Toggles whether the entire client portal is displayed to the client, or only the context' - type: boolean - example: false + description: "Toggles whether the entire client portal is displayed to the client, or only the context" + type: boolean + example: false email_template_statement: - description: 'The body of the email for statements' - type: string - example: 'template matter' + description: "The body of the email for statements" + type: string + example: "template matter" email_subject_statement: - description: 'The subject of the email for statements' - type: string - example: 'subject matter' + description: "The subject of the email for statements" + type: string + example: "subject matter" signature_on_pdf: - description: 'Toggles whether the signature (if available) is displayed on the PDF' - type: boolean - example: false + description: "Toggles whether the signature (if available) is displayed on the PDF" + type: boolean + example: false quote_footer: - description: 'The default quote footer' - type: string - example: 'the quote footer' + description: "The default quote footer" + type: string + example: "the quote footer" email_subject_custom1: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 1' + description: "Custom reminder template subject" + type: string + example: "Custom Subject 1" email_subject_custom2: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 2' + description: "Custom reminder template subject" + type: string + example: "Custom Subject 2" email_subject_custom3: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 3' + description: "Custom reminder template subject" + type: string + example: "Custom Subject 3" email_template_custom1: - description: 'Custom reminder template body' - type: string - example: '' + description: "Custom reminder template body" + type: string + example: "" email_template_custom2: - description: 'Custom reminder template body' - type: string - example: '' + description: "Custom reminder template body" + type: string + example: "" email_template_custom3: - description: 'Custom reminder template body' - type: string - example: '' + description: "Custom reminder template body" + type: string + example: "" enable_reminder1: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false + description: "Toggles whether this reminder is enabled" + type: boolean + example: false enable_reminder2: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false + description: "Toggles whether this reminder is enabled" + type: boolean + example: false enable_reminder3: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false + description: "Toggles whether this reminder is enabled" + type: boolean + example: false num_days_reminder1: - description: 'The Reminder interval' - type: number - example: '9' + description: "The Reminder interval" + type: number + example: "9" num_days_reminder2: - description: 'The Reminder interval' - type: number - example: '9' + description: "The Reminder interval" + type: number + example: "9" num_days_reminder3: - description: 'The Reminder interval' - type: number - example: '9' + description: "The Reminder interval" + type: number + example: "9" schedule_reminder1: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date schedule_reminder2: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date schedule_reminder3: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date late_fee_amount1: - description: 'The late fee amount for reminder 1' - type: number - example: 10 + description: "The late fee amount for reminder 1" + type: number + example: 10 late_fee_amount2: - description: 'The late fee amount for reminder 2' - type: number - example: 20 + description: "The late fee amount for reminder 2" + type: number + example: 20 late_fee_amount3: - description: 'The late fee amount for reminder 2' - type: number - example: 100 + description: "The late fee amount for reminder 2" + type: number + example: 100 endless_reminder_frequency_id: - description: 'The frequency id of the endless reminder' - type: string - example: '1' + description: "The frequency id of the endless reminder" + type: string + example: "1" client_online_payment_notification: - description: 'Determines if a client should receive the notification for a online payment' - type: boolean - example: false + description: "Determines if a client should receive the notification for a online payment" + type: boolean + example: false client_manual_payment_notification: - description: 'Determines if a client should receive the notification for a manually entered payment' - type: boolean - example: false + description: "Determines if a client should receive the notification for a manually entered payment" + type: boolean + example: false enable_e_invoice: - description: 'Determines if e-invoicing is enabled' - type: boolean - example: false + description: "Determines if e-invoicing is enabled" + type: boolean + example: false default_expense_payment_type_id: - description: 'The default payment type for expenses' - type: string - example: '0' + description: "The default payment type for expenses" + type: string + example: "0" e_invoice_type: - description: 'The e-invoice type' - type: string - example: 'EN16931' + description: "The e-invoice type" + type: string + example: "EN16931" mailgun_endpoint: - description: 'The mailgun endpoint - used to determine whether US or EU endpoints are used' - type: string - example: 'api.mailgun.net or api.eu.mailgun.net' + description: "The mailgun endpoint - used to determine whether US or EU endpoints are used" + type: string + example: "api.mailgun.net or api.eu.mailgun.net" client_initiated_payments: - description: 'Determines if clients can initiate payments directly from the client portal' - type: boolean - example: false + description: "Determines if clients can initiate payments directly from the client portal" + type: boolean + example: false client_initiated_payments_minimum: - description: 'The minimum amount a client can pay' - type: number - example: 10 + description: "The minimum amount a client can pay" + type: number + example: 10 sync_invoice_quote_columns: - description: 'Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns' - type: boolean - example: false + description: "Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns" + type: boolean + example: false show_task_item_description: - description: 'Determines if the task item description is shown on the invoice' - type: boolean - example: false + description: "Determines if the task item description is shown on the invoice" + type: boolean + example: false allow_billable_task_items: - description: 'Determines if task items can be marked as billable' - type: boolean - example: false + description: "Determines if task items can be marked as billable" + type: boolean + example: false accept_client_input_quote_approval: - description: 'Determines if clients can approve quotes and also pass through a PO Number reference' - type: boolean - example: false + description: "Determines if clients can approve quotes and also pass through a PO Number reference" + type: boolean + example: false custom_sending_email: - description: 'When using Mailgun or Postmark, the FROM email address can be customized using this setting.' - type: string - example: 'bob@gmail.com' + description: "When using Mailgun or Postmark, the FROM email address can be customized using this setting." + type: string + example: "bob@gmail.com" show_paid_stamp: - description: 'Determines if the PAID stamp is shown on the invoice' - type: boolean - example: false + description: "Determines if the PAID stamp is shown on the invoice" + type: boolean + example: false show_shipping_address: - description: 'Determines if the shipping address is shown on the invoice' - type: boolean - example: false + description: "Determines if the shipping address is shown on the invoice" + type: boolean + example: false company_logo_size: - description: 'The size of the company logo on the PDF - percentage value between 0 and 100' - type: number - example: 100 + description: "The size of the company logo on the PDF - percentage value between 0 and 100" + type: number + example: 100 show_email_footer: - description: 'Determines if the email footer is shown on emails' - type: boolean - example: false + description: "Determines if the email footer is shown on emails" + type: boolean + example: false email_alignment: - description: 'The alignment of the email body text, options include left / center / right' - type: string - example: 'left' + description: "The alignment of the email body text, options include left / center / right" + type: string + example: "left" auto_bill_standard_invoices: - description: 'Determines if standard invoices are automatically billed when they are created or due' - type: boolean - example: false + description: "Determines if standard invoices are automatically billed when they are created or due" + type: boolean + example: false postmark_secret: - description: 'The Postmark secret API key' - type: string - example: '123456' + description: "The Postmark secret API key" + type: string + example: "123456" mailgun_secret: - description: 'The Mailgun secret API key' - type: string - example: '123456' + description: "The Mailgun secret API key" + type: string + example: "123456" mailgun_domain: - description: 'The Mailgun domain' - type: string - example: 'sandbox123456.mailgun.org' + description: "The Mailgun domain" + type: string + example: "sandbox123456.mailgun.org" send_email_on_mark_paid: - description: 'Determines if an email is sent when an invoice is marked as paid' - type: boolean - example: false + description: "Determines if an email is sent when an invoice is marked as paid" + type: boolean + example: false vendor_portal_enable_uploads: - description: 'Determines if vendors can upload files to the portal' - type: boolean - example: false + description: "Determines if vendors can upload files to the portal" + type: boolean + example: false besr_id: - description: 'The BESR ID' - type: string - example: '123456' + description: "The BESR ID" + type: string + example: "123456" qr_iban: - description: 'The IBAN for the QR code' - type: string - example: 'CH123456' + description: "The IBAN for the QR code" + type: string + example: "CH123456" email_subject_purchase_order: - description: 'The email subject for purchase orders' - type: string - example: 'Purchase Order' + description: "The email subject for purchase orders" + type: string + example: "Purchase Order" email_template_purchase_order: - description: 'The email template for purchase orders' - type: string - example: 'Please see attached your purchase order.' + description: "The email template for purchase orders" + type: string + example: "Please see attached your purchase order." require_purchase_order_signature: - description: 'Determines if a signature is required on purchase orders' - type: boolean - example: false + description: "Determines if a signature is required on purchase orders" + type: boolean + example: false purchase_order_public_notes: - description: 'The public notes for purchase orders' - type: string - example: 'Please see attached your purchase order.' + description: "The public notes for purchase orders" + type: string + example: "Please see attached your purchase order." purchase_order_terms: - description: 'The terms for purchase orders' - type: string - example: 'Please see attached your purchase order.' + description: "The terms for purchase orders" + type: string + example: "Please see attached your purchase order." purchase_order_footer: - description: 'The footer for purchase orders' - type: string - example: 'Please see attached your purchase order.' + description: "The footer for purchase orders" + type: string + example: "Please see attached your purchase order." purchase_order_design_id: - description: 'The design id for purchase orders' - type: string - example: 'hd677df' + description: "The design id for purchase orders" + type: string + example: "hd677df" purchase_order_number_pattern: - description: 'The pattern for purchase order numbers' - type: string - example: 'PO-000000' + description: "The pattern for purchase order numbers" + type: string + example: "PO-000000" purchase_order_number_counter: - description: 'The counter for purchase order numbers' - type: number - example: 1 + description: "The counter for purchase order numbers" + type: number + example: 1 page_numbering_alignment: - description: 'The alignment for page numbering: options include left / center / right' - type: string - example: 'left' + description: "The alignment for page numbering: options include left / center / right" + type: string + example: "left" page_numbering: - description: 'Determines if page numbering is enabled on Document PDFs' - type: boolean - example: false + description: "Determines if page numbering is enabled on Document PDFs" + type: boolean + example: false auto_archive_invoice_cancelled: - description: 'Determines if invoices are automatically archived when they are cancelled' - type: boolean - example: false + description: "Determines if invoices are automatically archived when they are cancelled" + type: boolean + example: false email_from_name: - description: 'The FROM name for emails when using Custom emailers' - type: string - example: 'Bob Smith' + description: "The FROM name for emails when using Custom emailers" + type: string + example: "Bob Smith" show_all_tasks_client_portal: - description: 'Determines if all tasks are shown on the client portal' - type: boolean - example: false + description: "Determines if all tasks are shown on the client portal" + type: boolean + example: false entity_send_time: - description: 'The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24' - type: integer - example: 9 + description: "The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24" + type: integer + example: 9 shared_invoice_credit_counter: - description: 'Determines if the invoice and credit counter are shared' - type: boolean - example: false + description: "Determines if the invoice and credit counter are shared" + type: boolean + example: false reply_to_name: - description: 'The reply to name for emails' - type: string - example: 'Bob Smith' + description: "The reply to name for emails" + type: string + example: "Bob Smith" hide_empty_columns_on_pdf: - description: 'Determines if empty columns are hidden on PDFs' - type: boolean - example: false + description: "Determines if empty columns are hidden on PDFs" + type: boolean + example: false enable_reminder_endless: - description: 'Determines if endless reminders are enabled' - type: boolean - example: false + description: "Determines if endless reminders are enabled" + type: boolean + example: false use_credits_payment: - description: 'Determines if credits can be used as a payment method' - type: boolean - example: false + description: "Determines if credits can be used as a payment method" + type: boolean + example: false recurring_invoice_number_pattern: - description: 'The pattern for recurring invoice numbers' - type: string - example: 'R-000000' + description: "The pattern for recurring invoice numbers" + type: string + example: "R-000000" recurring_invoice_number_counter: - description: 'The counter for recurring invoice numbers' - type: number - example: 1 + description: "The counter for recurring invoice numbers" + type: number + example: 1 client_portal_under_payment_minimum: - description: 'The minimum payment payment' - type: number - example: 10 + description: "The minimum payment payment" + type: number + example: 10 auto_bill_date: - description: 'Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))' - type: string - example: 'on_send_date' + description: "Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))" + type: string + example: "on_send_date" primary_color: - description: 'The primary color for the client portal / document highlights' - type: string - example: '#ffffff' + description: "The primary color for the client portal / document highlights" + type: string + example: "#ffffff" secondary_color: - description: 'The secondary color for the client portal / document highlights' - type: string - example: '#ffffff' + description: "The secondary color for the client portal / document highlights" + type: string + example: "#ffffff" client_portal_allow_under_payment: - description: 'Determines if clients can pay invoices under the invoice amount due' - type: boolean - example: false + description: "Determines if clients can pay invoices under the invoice amount due" + type: boolean + example: false client_portal_allow_over_payment: - description: 'Determines if clients can pay invoices over the invoice amount' - type: boolean - example: false + description: "Determines if clients can pay invoices over the invoice amount" + type: boolean + example: false auto_bill: - description: 'Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing' - type: string - example: 'off' + description: "Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing" + type: string + example: "off" client_portal_terms: - description: 'The terms which are displayed on the client portal' - type: string - example: 'Please see attached your invoice.' + description: "The terms which are displayed on the client portal" + type: string + example: "Please see attached your invoice." client_portal_privacy_policy: - description: 'The privacy policy which is displayed on the client portal' - type: string - example: 'These are the terms of use for using the client portal.' + description: "The privacy policy which is displayed on the client portal" + type: string + example: "These are the terms of use for using the client portal." client_can_register: - description: 'Determines if clients can register on the client portal' - type: boolean - example: false + description: "Determines if clients can register on the client portal" + type: boolean + example: false portal_design_id: - description: 'The design id for the client portal' - type: string - example: 'hd677df' + description: "The design id for the client portal" + type: string + example: "hd677df" late_fee_endless_percent: - description: 'The late fee percentage for endless late fees' - type: number - example: 10 + description: "The late fee percentage for endless late fees" + type: number + example: 10 late_fee_endless_amount: - description: 'The late fee amount for endless late fees' - type: number - example: 10 + description: "The late fee amount for endless late fees" + type: number + example: 10 auto_email_invoice: - description: 'Determines if invoices are automatically emailed when they are created' - type: boolean - example: false + description: "Determines if invoices are automatically emailed when they are created" + type: boolean + example: false email_signature: - description: 'The email signature for emails' - type: string - example: 'Bob Smith' + description: "The email signature for emails" + type: string + example: "Bob Smith" classification: - description: 'The classification for the company' - type: string - example: 'individual' - type: object \ No newline at end of file + description: "The classification for the company" + type: string + example: "individual" + type: object From 507cdafa26736e85f29e334f3da9e5bdaaaec074 Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 21 Dec 2023 16:59:39 +0100 Subject: [PATCH 02/92] working --- app/DataMapper/CompanySettings.php | 6 - app/DataMapper/Settings/SettingsData.php | 6 +- app/Jobs/Mail/NinjaMailerJob.php | 9 +- app/Providers/AppServiceProvider.php | 27 +- app/Services/Email/AdminEmail.php | 16 +- app/Services/Email/Email.php | 22 +- config/brevo.php | 30 + config/services.php | 5 +- openapi/api-docs.yaml | 42958 ++++++++++----------- 9 files changed, 21540 insertions(+), 21539 deletions(-) create mode 100644 config/brevo.php diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 855188dad49e..a0c0265bebe8 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -453,10 +453,6 @@ class CompanySettings extends BaseSettings public $brevo_secret = ''; - public $brevo_domain = ''; - - public $brevo_endpoint = 'api.mailgun.net'; //api.eu.mailgun.net - public $auto_bill_standard_invoices = false; public $email_alignment = 'center'; // center , left, right @@ -511,7 +507,6 @@ class CompanySettings extends BaseSettings 'default_expense_payment_type_id' => 'string', 'e_invoice_type' => 'string', 'mailgun_endpoint' => 'string', - 'brevo_endpoint' => 'string', 'client_initiated_payments' => 'bool', 'client_initiated_payments_minimum' => 'float', 'sync_invoice_quote_columns' => 'bool', @@ -529,7 +524,6 @@ class CompanySettings extends BaseSettings 'mailgun_secret' => 'string', 'mailgun_domain' => 'string', 'brevo_secret' => 'string', - 'brevo_domain' => 'string', 'send_email_on_mark_paid' => 'bool', 'vendor_portal_enable_uploads' => 'bool', 'besr_id' => 'string', diff --git a/app/DataMapper/Settings/SettingsData.php b/app/DataMapper/Settings/SettingsData.php index 8f3419eb1fb1..036d7b637add 100644 --- a/app/DataMapper/Settings/SettingsData.php +++ b/app/DataMapper/Settings/SettingsData.php @@ -213,7 +213,7 @@ class SettingsData public bool $show_accept_quote_terms = false; //@TODO ben to confirm - public string $email_sending_method = 'default'; // enum 'default', 'gmail', 'office365', 'client_postmark', 'client_mailgun' , 'brevo_mailgun' //@implemented + public string $email_sending_method = 'default'; // enum 'default', 'gmail', 'office365', 'client_postmark', 'client_mailgun' , 'client_brevo' //@implemented public string $gmail_sending_user_id = '0'; //@implemented @@ -435,10 +435,6 @@ class SettingsData public string $brevo_secret = ''; - public string $brevo_domain = ''; - - public string $brevo_endpoint = 'api.mailgun.net'; // api.eu.mailgun.net - public bool $auto_bill_standard_invoices = false; public string $email_alignment = 'center'; // center, left, right diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 8601350b023c..3fa591ebbe6e 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -64,8 +64,6 @@ class NinjaMailerJob implements ShouldQueue protected $client_brevo_secret = false; - protected $client_brevo_domain = false; - public function __construct(NinjaMailerObject $nmo, bool $override = false) { $this->nmo = $nmo; @@ -137,7 +135,7 @@ class NinjaMailerJob implements ShouldQueue } if ($this->client_brevo_secret) { - $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->nmo->settings->brevo_endpoint); + $mailer->brevo_config($this->client_brevo_secret); } $mailer @@ -335,8 +333,6 @@ class NinjaMailerJob implements ShouldQueue $this->client_brevo_secret = false; - $this->client_brevo_domain = false; - //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -406,9 +402,8 @@ class NinjaMailerJob implements ShouldQueue */ private function setBrevoMailer() { - if (strlen($this->nmo->settings->brevo_secret) > 2 && strlen($this->nmo->settings->brevo_domain) > 2) { + if (strlen($this->nmo->settings->brevo_secret) > 2) { $this->client_brevo_secret = $this->nmo->settings->brevo_secret; - $this->client_brevo_domain = $this->nmo->settings->brevo_domain; } else { $this->nmo->settings->email_sending_method = 'default'; return $this->setMailDriver(); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 7bde51699e6a..1767ac11b1fb 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -28,6 +28,8 @@ use Illuminate\Support\Facades\Queue; use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider; use Livewire\Livewire; +use Symfony\Component\Mailer\Bridge\Brevo\Transport\BrevoTransportFactory; +use Symfony\Component\Mailer\Transport\Dsn; class AppServiceProvider extends ServiceProvider { @@ -113,15 +115,24 @@ class AppServiceProvider extends ServiceProvider return $this; }); - Mailer::macro('brevo_config', function (string $secret, string $domain, string $endpoint = 'api.mailgun.net') { + Mail::extend('brevo', function () { + return (new BrevoTransportFactory)->create( + new Dsn( + 'brevo+api', + 'default', + config('services.brevo.key') + ) + ); + }); + Mailer::macro('brevo_config', function (string $key) { // @phpstan-ignore /** @phpstan-ignore-next-line **/ - Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([ - 'transport' => 'brevo', - 'secret' => $secret, - 'domain' => $domain, - 'endpoint' => $endpoint, - 'scheme' => config('services.brevo.scheme'), - ])); + Mail::setSymfonyTransport((new BrevoTransportFactory)->create( + new Dsn( + 'brevo+api', + 'default', + $key + ) + )); return $this; }); diff --git a/app/Services/Email/AdminEmail.php b/app/Services/Email/AdminEmail.php index a6f5dc6b78d0..881ddacc6549 100644 --- a/app/Services/Email/AdminEmail.php +++ b/app/Services/Email/AdminEmail.php @@ -57,10 +57,6 @@ class AdminEmail implements ShouldQueue protected ?string $client_brevo_secret = null; - protected ?string $client_brevo_domain = null; - - protected ?string $client_brevo_endpoint = null; - private string $mailer = 'default'; public Mailable $mailable; @@ -140,7 +136,7 @@ class AdminEmail implements ShouldQueue } if ($this->client_brevo_secret) { - $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->client_brevo_endpoint); + $mailer->brevo_config($this->client_brevo_secret); } /* Attempt the send! */ @@ -254,7 +250,7 @@ class AdminEmail implements ShouldQueue } /* GMail users are uncapped */ - if (in_array($this->email_object->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun'])) { + if (in_array($this->email_object->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun', 'client_brevo'])) { return false; } @@ -402,10 +398,6 @@ class AdminEmail implements ShouldQueue $this->client_brevo_secret = null; - $this->client_brevo_domain = null; - - $this->client_brevo_endpoint = null; - //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -476,10 +468,8 @@ class AdminEmail implements ShouldQueue */ private function setBrevoMailer() { - if (strlen($this->email_object->settings->brevo_secret) > 2 && strlen($this->email_object->settings->brevo_domain) > 2) { + if (strlen($this->email_object->settings->brevo_secret) > 2) { $this->client_brevo_secret = $this->email_object->settings->brevo_secret; - $this->client_brevo_domain = $this->email_object->settings->brevo_domain; - $this->client_brevo_endpoint = $this->email_object->settings->brevo_endpoint; } else { $this->email_object->settings->email_sending_method = 'default'; diff --git a/app/Services/Email/Email.php b/app/Services/Email/Email.php index caffd425e3be..5da97944e91e 100644 --- a/app/Services/Email/Email.php +++ b/app/Services/Email/Email.php @@ -40,6 +40,7 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Mail; +use Log; use Turbo124\Beacon\Facades\LightLogs; class Email implements ShouldQueue @@ -62,10 +63,6 @@ class Email implements ShouldQueue protected ?string $client_brevo_secret = null; - protected ?string $client_brevo_domain = null; - - protected ?string $client_brevo_endpoint = null; - private string $mailer = 'default'; public Mailable $mailable; @@ -238,10 +235,13 @@ class Email implements ShouldQueue public function email() { // $this->setMailDriver(); + Log::info("mail(): " . $this->mailer); + Log::info($this->client_brevo_secret); /* Init the mailer*/ $mailer = Mail::mailer($this->mailer); + /* Additional configuration if using a client third party mailer */ if ($this->client_postmark_secret) { $mailer->postmark_config($this->client_postmark_secret); @@ -252,7 +252,7 @@ class Email implements ShouldQueue } if ($this->client_brevo_secret) { - $mailer->brevo_config($this->client_brevo_secret, $this->client_brevo_domain, $this->client_brevo_endpoint); + $mailer->brevo_config($this->client_brevo_secret); } /* Attempt the send! */ @@ -385,7 +385,7 @@ class Email implements ShouldQueue } /* GMail users are uncapped */ - if (in_array($this->email_object->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun'])) { + if (in_array($this->email_object->settings->email_sending_method, ['gmail', 'office365', 'client_postmark', 'client_mailgun', 'client_brevo'])) { return false; } @@ -461,6 +461,8 @@ class Email implements ShouldQueue */ private function setMailDriver(): self { + Log::info("E-Mail Sending Method (setMailDriver): " . $this->email_object->settings->email_sending_method); + Log::info(json_encode($this->email_object->settings)); switch ($this->email_object->settings->email_sending_method) { case 'default': $this->mailer = config('mail.default'); @@ -541,10 +543,6 @@ class Email implements ShouldQueue $this->client_brevo_secret = null; - $this->client_brevo_domain = null; - - $this->client_brevo_endpoint = null; - //always dump the drivers to prevent reuse app('mail.manager')->forgetMailers(); } @@ -615,10 +613,8 @@ class Email implements ShouldQueue */ private function setBrevoMailer() { - if (strlen($this->email_object->settings->brevo_secret) > 2 && strlen($this->email_object->settings->brevo_domain) > 2) { + if (strlen($this->email_object->settings->brevo_secret) > 2) { $this->client_brevo_secret = $this->email_object->settings->brevo_secret; - $this->client_brevo_domain = $this->email_object->settings->brevo_domain; - $this->client_brevo_endpoint = $this->email_object->settings->brevo_endpoint; } else { $this->email_object->settings->email_sending_method = 'default'; diff --git a/config/brevo.php b/config/brevo.php new file mode 100644 index 000000000000..7fae1ccab09b --- /dev/null +++ b/config/brevo.php @@ -0,0 +1,30 @@ + env('BREVO_SECRET'), + + /* + |-------------------------------------------------------------------------- + | Guzzle options + |-------------------------------------------------------------------------- + | + | Under the hood we use Guzzle to make API calls to Postmark. + | Here you may provide any request options for Guzzle. + | + */ + + 'guzzle' => [ + 'timeout' => 120, + 'connect_timeout' => 120, + ], +]; diff --git a/config/services.php b/config/services.php index aa1f51e03ef9..9487f3334a11 100644 --- a/config/services.php +++ b/config/services.php @@ -26,10 +26,7 @@ return [ ], 'brevo' => [ - 'domain' => env('BREVO_DOMAIN', ''), - 'secret' => env('BREVO_SECRET', ''), - 'endpoint' => env('BREVO_ENDPOINT', 'api.mailgun.net'), - 'scheme' => 'https', + 'key' => env('BREVO_SECRET', ''), ], 'postmark' => [ diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index 32a10fb6e453..0142bd9c0019 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -1,21532 +1,21524 @@ openapi: 3.0.0 info: - title: 'Invoice Ninja API Reference - Where self host invoicing lives.' - description: | + title: "Invoice Ninja API Reference - Where self host invoicing lives." + description: | ---
The Invoice Ninja API is organized around REST and returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. -
+
- termsOfService: 'https://invoiceninja.github.io/docs/legal/terms_of_service/#page-content' - contact: - email: contact@invoiceninja.com - license: - name: 'Elastic License' - url: 'https://www.elastic.co/licensing/elastic-license' - version: 5.5.70 + termsOfService: "https://invoiceninja.github.io/docs/legal/terms_of_service/#page-content" + contact: + email: contact@invoiceninja.com + license: + name: "Elastic License" + url: "https://www.elastic.co/licensing/elastic-license" + version: 5.5.70 servers: - - - url: 'https://demo.invoiceninja.com' - description: | - ## Demo API Server InvoiceNinja. + - url: "https://demo.invoiceninja.com" + description: | + ## Demo API Server InvoiceNinja. You can use the demo API key `TOKEN` to test the endpoints from within this API spec paths: - /api/v1/activities: - get: - tags: - - actvities - summary: "Returns a list of actvities" - description: "Lists all activities related to this company" - operationId: getActivities - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/activity_include" - - $ref: "#/components/parameters/index" - - $ref: "#/components/parameters/per_page_meta" - - $ref: "#/components/parameters/page_meta" - responses: - 200: - description: "Returns the list of activities" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Activity' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" + /api/v1/activities: + get: + tags: + - actvities + summary: "Returns a list of actvities" + description: "Lists all activities related to this company" + operationId: getActivities + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/activity_include" + - $ref: "#/components/parameters/index" + - $ref: "#/components/parameters/per_page_meta" + - $ref: "#/components/parameters/page_meta" + responses: + 200: + description: "Returns the list of activities" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Activity" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/actvities/download_entity/{activity_id}": - get: - tags: - - actvities - summary: "Returns a PDF for the given activity" - description: "Returns a PDF for the given activity" - operationId: getActivityHistoricalEntityPdf - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/activity_include" - - name: activity_id - in: path - description: "The Activity Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "PDF File" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 404: - description: "No file exists for the given record" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/login: - post: - tags: - - login - summary: "Attempts authentication" - description: "Returns a CompanyUser object on success" - operationId: postLogin - security: - - [] - parameters: - - $ref: "#/components/parameters/X-API-SECRET" - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/login_include" - - $ref: "#/components/parameters/include_static" - - $ref: "#/components/parameters/clear_cache" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - properties: - email: - description: "The users email address." - type: string - example: "demo@invoiceninja.com" - password: - description: "The user password. Must meet minimum criteria ~ > 6 characters" - type: string - example: "Password0" - type: object - responses: - 200: - description: "Returns the company user object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - 5XX: - $ref: "#/components/responses/5XX" - default: - $ref: "#/components/responses/default" - /api/v1/refresh: - post: - tags: - - refresh - summary: "Refresh data by timestamp" - description: | - Refreshes the dataset. - - This endpoint can be used if you only need to access the most recent data from a certain point in time. - operationId: refresh - parameters: - - name: updated_at - in: query - description: "The unix timestamp from which the refreshed data should be sent from, if no value is passed the system will assume you require all data." - required: true - schema: - type: number - format: integer - example: 1676173763 - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/include_static" - - $ref: "#/components/parameters/clear_cache" - responses: - 200: - description: "The Company User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyUser" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/yodlee/refresh: - post: - tags: - - yodlee - summary: "Yodlee Webhook" - description: "Webhook endpoint for Yodlee. Used to notify the system that a data point can be updated." - operationId: yodleeRefreshWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations: - get: - tags: - - bank_integrations - summary: "Returns a list of Bank Integrations" - description: "Lists all bank integrations" - operationId: getBankIntegrations - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/bank_integration_include" - - $ref: "#/components/parameters/index" - - name: rows - in: query - description: "The number of bank integrations to return" - required: false - schema: - type: number - format: integer - example: "50" - responses: - 200: - description: "A list of bank integrations" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/BankIntegration' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - bank_integrations - summary: "Adds a bank_integration" - description: "Adds an bank_integration to a company" - operationId: storeBankIntegration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_integrations/{id}": - get: - tags: - - bank_integrations - summary: "Shows a bank_integration" - description: "Displays a bank_integration by id" - operationId: showBankIntegration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankIntegration Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - bank_integrations - summary: "Updates a bank_integration" - description: "Handles the updating of a bank_integration by id" - operationId: updateBankIntegration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankIntegration Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - bank_integrations - summary: "Deletes a bank_integration" - description: "Handles the deletion of a bank_integration by id" - operationId: deleteBankIntegration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankIntegration Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_integrations/{id}/edit": - get: - tags: - - bank_integrations - summary: "Shows a bank_integration for editing" - description: "Displays a bank_integration by id" - operationId: editBankIntegration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankIntegration Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations/create: - get: - tags: - - bank_integrations - summary: "Gets a new blank bank_integration object" - description: "Returns a blank object with default values" - operationId: getBankIntegrationsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations/bulk: - post: - tags: - - bank_integrations - summary: "Performs bulk actions on an array of bank_integrations" - description: "" - operationId: bulkBankIntegrations - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Action paramters" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations/refresh_accounts: - post: - tags: - - bank_integrations - summary: "Gets the list of accounts from the remote server" - description: "Adds an bank_integration to a company" - operationId: getRefreshAccounts - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations/remove_account/account_id: - post: - tags: - - bank_integrations - summary: "Removes an account from the integration" - description: "Removes an account from the integration" - operationId: getRemoveAccount - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the bank_integration object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_integrations/get_transactions/account_id: - post: - tags: - - bank_integrations - summary: "Retrieve transactions for a account" - description: "Retrieve transactions for a account" - operationId: getAccountTransactions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Retrieve transactions for a account" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankIntegration" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transactions: - get: - tags: - - bank_transactions - summary: "Gets a list of bank_transactions" - description: "Lists all bank integrations" - operationId: getBankTransactions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - - name: rows - in: query - description: "The number of bank integrations to return" - required: false - schema: - type: number - format: integer - example: "50" - responses: - 200: - description: "A list of bank integrations" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/BankTransaction' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - bank_transactions - summary: "Adds a bank_transaction" - description: "Adds an bank_transaction to a company" - operationId: storeBankTransaction - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved bank_transaction object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransaction" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_transactions/{id}": - get: - tags: - - bank_transactions - summary: "Shows a bank_transaction" - description: "Displays a bank_transaction by id" - operationId: showBankTransaction - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankTransaction Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransaction" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - bank_transactions - summary: "Updates a bank_transaction" - description: "Handles the updating of a bank_transaction by id" - operationId: updateBankTransaction - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankTransaction Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransaction" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - bank_transactions - summary: "Deletes a bank_transaction" - description: "Handles the deletion of a bank_transaction by id" - operationId: deleteBankTransaction - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankTransaction Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_transactions/{id}/edit": - get: - tags: - - bank_transactions - summary: "Shows a bank_transaction for editing" - description: "Displays a bank_transaction by id" - operationId: editBankTransaction - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The BankTransaction Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransaction" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transactions/create: - get: - tags: - - bank_transactions - summary: "Gets a new blank bank_transaction object" - description: "Returns a blank object with default values" - operationId: getBankTransactionsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank bank_transaction object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransaction" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transations/bulk: - post: - tags: - - bank_transactions - summary: "Performs bulk actions on an array of bank_transations" - description: "" - operationId: bulkBankTransactions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Action paramters" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transations/match: - post: - tags: - - bank_transactions - summary: "Performs match actions on an array of bank_transactions" - description: "" - operationId: matchBankTransactions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Action paramters" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transaction_rules: - get: - tags: - - bank_transaction_rules - summary: "Gets a list of bank_transaction_rules" - description: "Lists all bank transaction rules" - operationId: getBankTransactionRules - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - - name: rows - in: query - description: "The number of bank integrations to return" - required: false - schema: - type: number - format: integer - example: "50" - responses: - 200: - description: "A list of bank integrations" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/BankTransactionRule' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - bank_transaction_rules - summary: "Adds a bank_transaction rule" - description: "Adds an bank_transaction to a company" - operationId: storeBankTransactionRule - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved bank_transaction rule object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransactionRule" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_transaction_rules/{id}": - get: - tags: - - bank_transaction_rules - summary: "Shows a bank_transaction" - description: "Displays a bank_transaction by id" - operationId: showBankTransactionRule - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Bank Transaction RuleHashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction rule object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransactionRule" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - bank_transaction_rules - summary: "Updates a bank_transaction Rule" - description: "Handles the updating of a bank_transaction rule by id" - operationId: updateBankTransactionRule - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Bank Transaction Rule Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction rule object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransactionRule" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - bank_transaction_rules - summary: "Deletes a bank_transaction rule" - description: "Handles the deletion of a bank_transaction rule by id" - operationId: deleteBankTransactionRule - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Bank Transaction Rule Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/bank_transaction_rules/{id}/edit": - get: - tags: - - bank_transaction_rules - summary: "Shows a bank_transaction for editing" - description: "Displays a bank_transaction by id" - operationId: editBankTransactionRule - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Bank Transaction Rule Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the bank_transaction rule object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransactionRule" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transaction_rules/create: - get: - tags: - - bank_transaction_rules - summary: "Gets a new blank bank_transaction rule object" - description: "Returns a blank object with default values" - operationId: getBankTransactionRulesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank bank_transaction rule object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/BankTransactionRule" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/bank_transation_rules/bulk: - post: - tags: - - bank_transaction_rules - summary: "Performs bulk actions on an array of bank_transation rules" - description: "" - operationId: bulkBankTransactionRules - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Action paramters" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/charts/totals: - post: - tags: - - charts - summary: "Get chart data" - description: "Get chart data" - operationId: getChartTotals - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - - name: rows - in: query - description: "The chart" - required: false - schema: - type: number - format: integer - example: "50" - responses: - 200: - description: "json dataset of chart data" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/client_gateway_tokens: - get: - tags: - - client_gateway_tokens - summary: "List of client tokens" - description: "Lists client_gateway_tokens, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the client_gateway_tokens, these are handled by the ClientGatewayTokenFilters class which defines the methods available" - operationId: getClientGatewayTokens - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of client_gateway_tokens" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ClientGatewayToken' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - client_gateway_tokens - summary: "Adds a client" - description: "Adds an client to a company" - operationId: storeClientGatewayToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ClientGatewayToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/client_gateway_tokens/{id}": - get: - tags: - - client_gateway_tokens - summary: "Shows a client" - description: "Displays a client by id" - operationId: showClientGatewayToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The ClientGatewayToken Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the cl.ient object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ClientGatewayToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - client_gateway_tokens - summary: "Updates a client" - description: "Handles the updating of a client by id" - operationId: updateClientGatewayToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The ClientGatewayToken Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ClientGatewayToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - client_gateway_tokens - summary: "Deletes a client" - description: "Handles the deletion of a client by id" - operationId: deleteClientGatewayToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The ClientGatewayToken Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/client_gateway_tokens/{id}/edit": - get: - tags: - - client_gateway_tokens - summary: "Shows a client for editting" - description: "Displays a client by id" - operationId: editClientGatewayToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The ClientGatewayToken Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ClientGatewayToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/client_gateway_tokens/create: - get: - tags: - - client_gateway_tokens - summary: "Gets a new blank client object" - description: "Returns a blank object with default values" - operationId: getClientGatewayTokensCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ClientGatewayToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/companies: - get: - tags: - - companies - summary: "Gets a list of companies" - description: "Lists companies, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the companies, these are handled by the CompanyFilters class which defines the methods available" - operationId: getCompanies - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of companies" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Company' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - companies - summary: "Adds a company" - description: "Adds an company to the system" - operationId: storeCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/companies/create: - get: - tags: - - companies - summary: "Gets a new blank company object" - description: "Returns a blank object with default values" - operationId: getCompaniesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/companies/{id}": - get: - tags: - - companies - summary: "Shows an company" - description: "Displays an company by id" - operationId: showCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - companies - summary: "Updates an company" - description: "Handles the updating of an company by id" - operationId: updateCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - companies - summary: "Deletes a company" - description: "Handles the deletion of an company by id" - operationId: deleteCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/companies/{id}/edit": - get: - tags: - - companies - summary: "Shows an company for editting" - description: "Displays an company by id" - operationId: editCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/companies/{id}/upload": - post: - tags: - - companies - summary: "Uploads a document to a company" - description: "Handles the uploading of a document to a company" - operationId: uploadCompanies - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/companies/{company}/default": - post: - tags: - - companies - summary: "Sets the company as the default company." - description: "Sets the company as the default company." - operationId: setDefaultCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: company - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the company object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Company" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/company_gateways: - get: - tags: - - company_gateways - summary: "Gets a list of company_gateways" - description: "Lists company_gateways, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available" - operationId: getCompanyGateways - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of company_gateways" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/CompanyGateway' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - company_gateways - summary: "Adds a CompanyGateway" - description: "Adds an CompanyGateway to the system" - operationId: storeCompanyGateway - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved CompanyGateway object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/company_gateways/create: - get: - tags: - - company_gateways - summary: "Gets a new blank CompanyGateway object" - description: "Returns a blank object with default values" - operationId: getCompanyGatewaysCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank CompanyGateway object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/company_gateways/{id}": - get: - tags: - - company_gateways - summary: "Shows an CompanyGateway" - description: "Displays an CompanyGateway by id" - operationId: showCompanyGateway - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The CompanyGateway Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the CompanyGateway object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - company_gateways - summary: "Updates an CompanyGateway" - description: "Handles the updating of an CompanyGateway by id" - operationId: updateCompanyGateway - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The CompanyGateway Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the CompanyGateway object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - company_gateways - summary: "Deletes a CompanyGateway" - description: "Handles the deletion of an CompanyGateway by id" - operationId: deleteCompanyGateway - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The CompanyGateway Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/company_gateways/{id}/edit": - get: - tags: - - company_gateways - summary: "Shows an CompanyGateway for editting" - description: "Displays an CompanyGateway by id" - operationId: editCompanyGateway - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The CompanyGateway Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the CompanyGateway object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/company_gateways/bulk: - post: - tags: - - company_gateways - summary: "Performs bulk actions on an array of company_gateways" - description: "" - operationId: bulkCompanyGateways - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Array of company gateway IDs" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Company Gateways response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyGateway" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/company_ledger: - get: - tags: - - company_ledger - summary: "Gets a list of company_ledger" - description: "Lists the company_ledger." - operationId: getCompanyLedger - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of company_ledger" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/CompanyLedger' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/company_users: - post: - tags: - - company_user - summary: "Update a company user record" - description: "Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users" - operationId: updateCompanyUser - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "The Company User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyUser" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/connected_account: - post: - tags: - - connected_account - summary: "Connect an oauth user to an existing user" - description: "Refreshes the dataset" - operationId: connected_account - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/include_static" - - $ref: "#/components/parameters/clear_cache" - responses: - 200: - description: "The Company User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/designs: - get: - tags: - - designs - summary: "Gets a list of designs" - description: "Lists designs" - operationId: getDesigns - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of designs" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Design' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - designs - summary: "Adds a design" - description: "Adds an design to a company" - operationId: storeDesign - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved design object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/designs/{id}": - get: - tags: - - designs - summary: "Shows a design" - description: "Displays a design by id" - operationId: showDesign - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Design Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - designs - summary: "Updates a design" - description: "Handles the updating of a design by id" - operationId: updateDesign - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Design Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the design object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - designs - summary: "Deletes a design" - description: "Handles the deletion of a design by id" - operationId: deleteDesign - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Design Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/designs/{id}/edit": - get: - tags: - - designs - summary: "Shows a design for editting" - description: "Displays a design by id" - operationId: editDesign - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Design Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the design object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/designs/create: - get: - tags: - - designs - summary: "Gets a new blank design object" - description: "Returns a blank object with default values" - operationId: getDesignsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank design object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/designs/bulk: - post: - tags: - - designs - summary: "Performs bulk actions on an array of designs" - description: "" - operationId: bulkDesigns - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Design User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Design" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/documents: - get: - tags: - - documents - summary: "Gets a list of documents" - description: "Lists documents, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the documents, these are handled by the DocumentsFilters class which defines the methods available" - operationId: getDocuments - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of documents" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Document' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/emails: - post: - tags: - - emails - summary: "Sends an email for an entity" - description: "Sends an email for an entity" - operationId: sendEmailTemplate - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - description: "Required fields to send an email" - required: true - content: - application/json: - schema: - required: - - entity - - entity_id - - template - properties: - subject: - description: "The email subject" - type: string - body: - description: "The email body" - type: string - entity: - description: "The entity name" - type: string - entity_id: - description: "The entity_id" - type: string - cc_email: - description: "The email address of a user to be CC'd on the email" - type: string - template: - description: "The template required" - type: string - example: invoice,quote,credit,purchase_order,payment,payment_partial,reminder1,reminder2,reminder3,reminder_endless - type: object - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Template" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expense_categories: - get: - tags: - - expense_categories - summary: "Gets a list of expense_categories" - description: "Lists tax rates" - operationId: getExpenseCategorys - parameters: - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of expense_categories" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/ExpenseCategory' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - expense_categories - summary: "Adds a expense category" - description: "Adds an expense category to the system" - operationId: storeExpenseCategory - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ExpenseCategory" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expense_categories/create: - get: - tags: - - expense_categories - summary: "Gets a new blank Expens Category object" - description: "Returns a blank object with default values" - operationId: getExpenseCategoryCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "A blank Expens Category object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ExpenseCategory" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/expense_categories/{id}": - get: - tags: - - expense_categories - summary: "Shows a Expens Category" - description: "Displays an ExpenseCategory by id" - operationId: showExpenseCategory - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The ExpenseCategory Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Expens Category object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ExpenseCategory" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - expense_categories - summary: "Updates a tax rate" - description: "Handles the updating of a tax rate by id" - operationId: updateExpenseCategory - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The ExpenseCategory Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the ExpenseCategory object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ExpenseCategory" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - expense_categories - summary: "Deletes a ExpenseCategory" - description: "Handles the deletion of an ExpenseCategory by id" - operationId: deleteExpenseCategory - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The ExpenseCategory Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/expense_categories/{id}/edit": - get: - tags: - - expense_categories - summary: "Shows a Expens Category for editting" - description: "Displays a Expens Category by id" - operationId: editExpenseCategory - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The ExpenseCategory Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Expens Category object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/ExpenseCategory" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expense_categories/bulk: - post: - tags: - - expense_categories - summary: "Performs bulk actions on an array of ExpenseCategorys" - description: "" - operationId: bulkExpenseCategorys - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Expens Categorys" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The ExpenseCategory List response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expenses: - get: - tags: - - expenses - summary: "Gets a list of expenses" - description: "Lists expenses, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the expenses, these are handled by the ExpenseFilters class which defines the methods available" - operationId: getExpenses - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of expenses" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Expense' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - expenses - summary: "Adds an expense" - description: "Adds a expense to a company" - operationId: storeExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/expenses/{id}": - get: - tags: - - expenses - summary: "Shows a expense" - description: "Displays a expense by id" - operationId: showExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Expense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - expenses - summary: "Updates a expense" - description: "Handles the updating of a expense by id" - operationId: updateExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Expense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - expenses - summary: "Deletes a expense" - description: "Handles the deletion of a expense by id" - operationId: deleteExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Expense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/expenses/{id}/edit": - get: - tags: - - expenses - summary: "Shows a expense for editing" - description: "Displays a client by id" - operationId: editExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Expense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expenses/create: - get: - tags: - - expenses - summary: "Gets a new blank expense object" - description: "Returns a blank object with default values" - operationId: getExpensesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/expenses/bulk: - post: - tags: - - expenses - summary: "Performs bulk actions on an array of expenses" - description: "" - operationId: bulkExpenses - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Expense User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/expenses/{id}/upload": - post: - tags: - - expense - summary: "Uploads a document to a expense" - description: "Handles the uploading of a document to a expense" - operationId: uploadExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Expense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Expense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/export: - post: - tags: - - export - summary: "Export data from the system" - description: "Export data from the system" - operationId: getExport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/group_settings: - get: - tags: - - group_settings - summary: "Gets a list of group_settings" - description: "Lists group_settings, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the group_settings, these are handled by the GroupSettingFilters class which defines the methods available" - operationId: getGroupSettings - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of group_settings" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/GroupSetting' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - group_settings - summary: "Adds a GroupSetting" - description: "Adds an GroupSetting to the system" - operationId: storeGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved GroupSetting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/GroupSetting" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/group_settings/create: - get: - tags: - - group_settings - summary: "Gets a new blank GroupSetting object" - description: "Returns a blank object with default values" - operationId: getGroupSettingsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank GroupSetting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/GroupSetting" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/group_settings/{id}": - get: - tags: - - group_settings - summary: "Shows an GroupSetting" - description: "Displays an GroupSetting by id" - operationId: showGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The GroupSetting Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the GroupSetting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/GroupSetting" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - group_settings - summary: "Updates an GroupSetting" - description: "Handles the updating of an GroupSetting by id" - operationId: updateGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The GroupSetting Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the GroupSetting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/GroupSetting" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - group_settings - summary: "Deletes a GroupSetting" - description: "Handles the deletion of an GroupSetting by id" - operationId: deleteGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The GroupSetting Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/group_settings/{id}/edit": - get: - tags: - - group_settings - summary: "Shows an GroupSetting for editting" - description: "Displays an GroupSetting by id" - operationId: editGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The GroupSetting Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the GroupSetting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/GroupSetting" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/group_settings/bulk: - post: - tags: - - group_settings - summary: "Performs bulk actions on an array of group_settings" - description: "" - operationId: bulkGroupSettings - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "An array of group_settings ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/group_settings/{id}/upload": - post: - tags: - - group_settings - summary: "Uploads a document to a group setting" - description: "Handles the uploading of a document to a group setting" - operationId: uploadGroupSetting - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Group Setting Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Group Setting object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/preimport: - post: - tags: - - imports - summary: "Pre Import checks - returns a reference to the job and the headers of the CSV" - description: "Pre Import checks - returns a reference to the job and the headers of the CSV" - operationId: preimport - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: "The CSV file" - required: true - content: - multipart/form-data: - schema: - type: string - format: binary - responses: - 200: - description: "Returns a reference to the file" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/import_json: - post: - tags: - - import - summary: "Import data from the system" - description: "Import data from the system" - operationId: getImportJson - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/apple/confirm_purchase: - post: - tags: - - postmark - summary: "Processing webhooks from Apple for in app purchases" - description: "Adds an credit to the system" - operationId: confirmApplePurchase - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/apple/process_webhook: - post: - tags: - - postmark - summary: "Processing event webhooks from Apple for in purchase / subscription status update" - description: "Adds an credit to the system" - operationId: processAppleWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/claim_license: - get: - tags: - - claim_license - summary: "Attempts to claim a white label license" - description: "Attempts to claim a white label license" - operationId: getClaimLicense - parameters: - - $ref: "#/components/parameters/X-Requested-With" - - name: license_key - in: query - description: "The license hash" - required: true - schema: - type: string - format: string - example: d87sh-s755s-s7d76-sdsd8 - - name: product_id - in: query - description: "The ID of the product purchased." - required: true - schema: - type: string - format: string - example: "1" - responses: - 200: - description: Success! - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/logout: - post: - tags: - - logout - summary: "Logs the user out of their current session" - description: "Logs the user out of their current session" - operationId: getLogout - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "Success message" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/migration/purge/{company}": - post: - tags: - - migration - summary: "Attempts to purge a company record and all its child records" - description: "Attempts to purge a company record and all its child records" - operationId: postPurgeCompany - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: company - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: Success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/migration/purge_save_settings/{company}": - post: - tags: - - migration - summary: "Attempts to purge a companies child records but save the company record and its settings" - description: "Attempts to purge a companies child records but save the company record and its settings" - operationId: postPurgeCompanySaveSettings - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: company - in: path - description: "The Company Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: Success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/migration/start: - post: - tags: - - migration - summary: "Starts the migration from previous version of Invoice Ninja" - description: "Starts the migration from previous version of Invoice Ninja" - operationId: postStartMigration - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/X-API-PASSWORD" - - name: migration - in: query - description: "The migraton file" - required: true - schema: - type: object - format: file - example: migration.zip - responses: - 200: - description: Success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/one_time_token: - post: - tags: - - one_time_token - summary: "Attempts to create a one time token" - description: "Attempts to create a one time token" - operationId: oneTimeToken - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "The Company User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/payment_terms: - get: - tags: - - payment_terms - summary: "Gets a list of payment terms" - description: "Lists payment terms" - operationId: getPaymentTerms - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of payment terms" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/PaymentTerm' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - payment_terms - summary: "Adds a Payment" - description: "Adds a Payment Term to the system" - operationId: storePaymentTerm - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: "The payment_terms request" - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - responses: - 200: - description: "Returns the saved Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/payment_terms/create: - get: - tags: - - payment_terms - summary: "Gets a new blank PaymentTerm object" - description: "Returns a blank object with default values" - operationId: getPaymentTermsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank PaymentTerm object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/payment_terms/{id}": - get: - tags: - - payment_terms - summary: "Shows a Payment Term" - description: "Displays an Payment Term by id" - operationId: showPaymentTerm - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Term Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment Term object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - payment_terms - summary: "Updates a Payment Term" - description: "Handles the updating of an Payment Termby id" - operationId: updatePaymentTerm - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Term Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment Term object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - payment_termss - summary: "Deletes a Payment Term" - description: "Handles the deletion of an PaymentTerm by id" - operationId: deletePaymentTerm - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Term Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/payment_terms/{id}/edit": - get: - tags: - - payment_terms - summary: "Shows an Payment Term for editting" - description: "Displays an Payment Term by id" - operationId: editPaymentTerms - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Term Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/payment_terms/bulk: - post: - tags: - - payment_terms - summary: "Performs bulk actions on an array of payment terms" - description: "" - operationId: bulkPaymentTerms - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Payment Ter,s" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Payment Terms response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PaymentTerm" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/ping: - get: - tags: - - ping - summary: "Attempts to ping the API" - description: "Attempts to ping the API" - operationId: getPing - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "The company and user name" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - /api/v1/health_check: - get: - tags: - - health_check - summary: "Attempts to get a health check from the API" - description: "Attempts to get a health check from the API" - operationId: getHealthCheck - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "A key/value map of the system health" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - /api/v1/postmark_webhook: - post: - tags: - - postmark - summary: "Processing webhooks from PostMark" - description: "Adds an credit to the system" - operationId: postmarkWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/preview: - post: - tags: - - preview - summary: "Returns a pdf preview" - description: "Returns a pdf preview." - operationId: getPreview - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "The pdf response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/preview/purchase_order: - post: - tags: - - preview - summary: "Returns a pdf preview for purchase order" - description: "Returns a pdf preview for purchase order." - operationId: getPreviewPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "The pdf response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/recurring_expenses: - get: - tags: - - recurring_expenses - summary: "Gets a list of recurring_expenses" - description: "Lists recurring_expenses, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available" - operationId: getRecurringExpenses - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of recurring_expenses" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RecurringExpense' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - recurring_expenses - summary: "Adds a recurring expense" - description: "Adds a recurring expense to a company" - operationId: storeRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved recurring expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_expenses/{id}": - get: - tags: - - recurring_expenses - summary: "Shows a recurring expense" - description: "Displays a recurring expense by id" - operationId: showRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringExpense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the recurring_expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - recurring_expenses - summary: "Updates a recurring expense" - description: "Handles the updating of a recurring expense by id" - operationId: updateRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringExpense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the recurring expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - recurring_expenses - summary: "Deletes a recurring expense" - description: "Handles the deletion of a recurring expense by id" - operationId: deleteRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringExpense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_expenses/{id}/edit": - get: - tags: - - recurring_expenses - summary: "Shows a recurring expense for editting" - description: "Displays a recurring expense by id" - operationId: editRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringExpense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the recurring expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/recurring_expenses/create: - get: - tags: - - recurring_expenses - summary: "Gets a new blank recurring expense object" - description: "Returns a blank object with default values" - operationId: getRecurringExpensesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank recurring expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/recurring_expenses/bulk: - post: - tags: - - recurring_expenses - summary: "Performs bulk actions on an array of recurring_expenses" - description: "" - operationId: bulkRecurringExpenses - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The RecurringExpense User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_expenses/{id}/upload": - post: - tags: - - recurring_expense - summary: "Uploads a document to a recurring_expense" - description: "Handles the uploading of a document to a recurring_expense" - operationId: uploadRecurringExpense - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringExpense Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the RecurringExpense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringExpense" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/recurring_quotes: - get: - tags: - - recurring_quotes - summary: "Gets a list of recurring_quotes" - description: "Lists recurring_quotes, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the recurring_quotes, these are handled by the RecurringQuoteFilters class which defines the methods available" - operationId: getRecurringQuotes - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of recurring_quotes" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RecurringQuote' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - recurring_quotes - summary: "Adds a RecurringQuote" - description: "Adds an RecurringQuote to the system" - operationId: storeRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/recurring_quotes/create: - get: - tags: - - recurring_quotes - summary: "Gets a new blank RecurringQuote object" - description: "Returns a blank object with default values" - operationId: getRecurringQuotesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_quotes/{id}": - get: - tags: - - recurring_quotes - summary: "Shows an RecurringQuote" - description: "Displays an RecurringQuote by id" - operationId: showRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringQuote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - recurring_quotes - summary: "Updates an RecurringQuote" - description: "Handles the updating of an RecurringQuote by id" - operationId: updateRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringQuote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - recurring_quotes - summary: "Deletes a RecurringQuote" - description: "Handles the deletion of an RecurringQuote by id" - operationId: deleteRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringQuote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_quotes/{id}/edit": - get: - tags: - - recurring_quotes - summary: "Shows an RecurringQuote for editting" - description: "Displays an RecurringQuote by id" - operationId: editRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringQuote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/recurring_quotes/bulk: - post: - tags: - - recurring_quotes - summary: "Performs bulk actions on an array of recurring_quotes" - description: "" - operationId: bulkRecurringQuotes - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Hashed ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The RecurringQuote response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_quotes/{id}/{action}": - get: - tags: - - recurring_quotes - summary: "Performs a custom action on an RecurringQuote" - description: "Performs a custom action on an RecurringQuote.\n\n The current range of actions are as follows\n - clone_to_RecurringQuote\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" - operationId: actionRecurringQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringQuote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the RecurringQuote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringQuote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/contacts: - post: - tags: - - reports - summary: "Contact reports" - description: "Export contact reports" - operationId: getContactReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/clients: - post: - tags: - - reports - summary: "Client reports" - description: "Export client reports" - operationId: getClientReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/credit: - post: - tags: - - reports - summary: "Credit reports" - description: "Export credit reports" - operationId: getCreditReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/documents: - post: - tags: - - reports - summary: "Document reports" - description: "Export document reports" - operationId: getDocumentReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/expense: - post: - tags: - - reports - summary: "Expense reports" - description: "Export expense reports" - operationId: getExpenseReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/invoice_items: - post: - tags: - - reports - summary: "Invoice item reports" - description: "Export invoice item reports" - operationId: getInvoiceItemReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/invoices: - post: - tags: - - reports - summary: "Invoice reports" - description: "Export invoice reports" - operationId: getInvoiceReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/payments: - post: - tags: - - reports - summary: "Payment reports" - description: "Export payment reports" - operationId: getPaymentReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/products: - post: - tags: - - reports - summary: "Product reports" - description: "Export product reports" - operationId: getProductReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/product_sales: - post: - tags: - - reports - summary: "Product Salesreports" - description: "Export product sales reports" - operationId: getProductSalesReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/profitloss: - post: - tags: - - reports - summary: "Profit loss reports" - description: "Profit loss report" - operationId: getProfitLossReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/quote_items: - post: - tags: - - reports - summary: "Quote item reports" - description: "Export Quote item reports" - operationId: getQuoteItemReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/quotes: - post: - tags: - - reports - summary: "Quote reports" - description: "Export quote reports" - operationId: getQuoteReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/recurring_invoices: - post: - tags: - - reports - summary: "Recurring Invoice reports" - description: "Export recurring invoice reports" - operationId: getRecurringInvoiceReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/reports/tasks: - post: - tags: - - reports - summary: "Task reports" - description: "Export task reports" - operationId: getTaskReport - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/GenericReportSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/self-update: - post: - tags: - - update - summary: "Performs a system update" - description: "Performs a system update" - operationId: selfUpdate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-API-PASSWORD" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Success/failure response" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/statics: - get: - tags: - - statics - summary: "Gets a list of statics" - description: "Lists all statics" - operationId: getStatics - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of static data" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/subscriptions: - get: - tags: - - subscriptions - summary: "Gets a list of subscriptions" - description: "Lists subscriptions." - operationId: getSubscriptions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of subscriptions" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Subscription' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - subscriptions - summary: "Adds a subscriptions" - description: "Adds an subscriptions to the system" - operationId: storeSubscription - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved subscriptions object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/subscriptions/create: - get: - tags: - - subscriptions - summary: "Gets a new blank subscriptions object" - description: "Returns a blank object with default values" - operationId: getSubscriptionsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank subscriptions object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/subscriptions/{id}": - get: - tags: - - subscriptions - summary: "Shows an subscriptions" - description: "Displays an subscriptions by id" - operationId: showSubscription - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Subscription Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Subscription object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - subscriptions - summary: "Updates an subscriptions" - description: "Handles the updating of an subscriptions by id" - operationId: updateSubscription - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Subscription Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the subscriptions object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - subscriptions - summary: "Deletes a subscriptions" - description: "Handles the deletion of an subscriptions by id" - operationId: deleteSubscription - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Subscription Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/subscriptions/{id}/edit": - get: - tags: - - subscriptions - summary: "Shows an subscriptions for editting" - description: "Displays an subscriptions by id" - operationId: editSubscription - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Subscription Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/subscriptions/bulk: - post: - tags: - - subscriptions - summary: "Performs bulk actions on an array of subscriptions" - description: "" - operationId: bulkSubscriptions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Subscription response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Subscription" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/support/messages/send: - post: - tags: - - support - summary: "Sends a support message to Invoice Ninja team" - description: "Allows a user to send a support message to the Invoice Ninja Team" - operationId: supportMessage - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - description: "The message" - required: true - content: - application/json: - schema: - properties: - message: - description: "The support message" - type: string - type: string - responses: - 200: - description: Success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: array - items: - description: "Server response" - type: string - example: true - default: - $ref: "#/components/responses/default" - /api/v1/system_logs: - get: - tags: - - system_logs - summary: "Gets a list of system logs" - description: "Lists system logs, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the system logs, these are handled by the SystemLogFilters class which defines the methods available" - operationId: getSystemLogs - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of system logs" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/SystemLog' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/system_logs/{id}": - get: - tags: - - system_logs - summary: "Shows a system_logs" - description: "Displays a system_logs by id" - operationId: showSystemLogs - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The system_logs Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the system_logs object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/SystemLog" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/task_schedulers/: - get: - tags: - - task_schedulers - summary: "Task Scheduler Index" - description: "Get all schedulers with associated jobs" - operationId: getTaskSchedulers - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - default: - $ref: "#/components/responses/default" - post: - tags: - - task_schedulers - summary: "Create task scheduler with job " - description: "Create task scheduler with a job (action(job) request should be sent via request also. Example: We want client report to be job which will be run\n * multiple times, we should send the same parameters in the request as we would send if we wanted to get report, see example" - operationId: createTaskScheduler - parameters: - - $ref: "#/components/parameters/X-API-SECRET" - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/TaskSchedulerSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/task_schedulers/create: - get: - tags: - - task_schedulers - summary: "Gets a new blank scheduler object" - description: "Returns a blank object with default values" - operationId: getTaskScheduler - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank scheduler object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskSchedulerSchema" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/task_schedulers/{id}": - get: - tags: - - task_schedulers - summary: "Show given scheduler" - description: "Get scheduler with associated job" - operationId: showTaskScheduler - parameters: - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The Scheduler Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - default: - $ref: "#/components/responses/default" - put: - tags: - - task_schedulers - summary: "Update task scheduler " - description: "Update task scheduler" - operationId: updateTaskScheduler - parameters: - - $ref: "#/components/parameters/X-API-SECRET" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The Scheduler Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/TaskSchedulerSchema" - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - task_schedulers - summary: "Destroy Task Scheduler" - description: "Destroy task scheduler and its associated job" - operationId: destroyTaskScheduler - parameters: - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The Scheduler Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: success - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - default: - $ref: "#/components/responses/default" - /api/v1/task_schedulers/bulk: - post: - tags: - - task_schedulers - summary: "Performs bulk actions on an array of task_schedulers" - description: "" - operationId: bulkTaskSchedulerActions - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "array of ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The TaskSchedule response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskSchedulerSchema" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/task_statuses: - get: - tags: - - task_status - summary: "Gets a list of task statuses" - description: "Lists task statuses" - operationId: getTaskStatuses - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of task statuses" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/TaskStatus' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - task_status - summary: "Adds a TaskStatus" - description: "Adds a TaskStatusto the system" - operationId: storeTaskStatus - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: "The task_status request" - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - responses: - 200: - description: "Returns the saved TaskStatus object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/task_statuses/create: - get: - tags: - - task_status - summary: "Gets a new blank TaskStatus object" - description: "Returns a blank object with default values" - operationId: getTaskStatussCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank TaskStatus object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/task_statuses/{id}": - get: - tags: - - task_status - summary: "Shows a TaskStatus Term" - description: "Displays an TaskStatusby id" - operationId: showTaskStatus - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The TaskStatusHashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the TaskStatusobject" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - task_status - summary: "Updates a TaskStatus Term" - description: "Handles the updating of an TaskStatus Termby id" - operationId: updateTaskStatus - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The TaskStatusHashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the TaskStatusobject" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - task_statuss - summary: "Deletes a TaskStatus Term" - description: "Handles the deletion of an TaskStatus by id" - operationId: deleteTaskStatus - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The TaskStatusHashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/task_statuses/{id}/edit": - get: - tags: - - task_status - summary: "Shows an TaskStatusfor editting" - description: "Displays an TaskStatusby id" - operationId: editTaskStatuss - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The TaskStatusHashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the TaskStatus object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/task_statuses/bulk: - post: - tags: - - task_status - summary: "Performs bulk actions on an array of task statuses" - description: "" - operationId: bulkTaskStatuss - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "TaskStatus Ter,s" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The TaskStatus Terms response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaskStatus" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tax_rates: - get: - tags: - - tax_rates - summary: "Gets a list of tax_rates" - description: "Lists tax rates" - operationId: getTaxRates - parameters: - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of tax_rates" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/TaxRate' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tax_rates/create: - get: - tags: - - tax_rates - summary: "Gets a new blank Tax Rate object" - description: "Returns a blank object with default values" - operationId: getTaxRateCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "A blank Tax Rate object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaxRate" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/tax_rates/{id}": - get: - tags: - - tax_rates - summary: "Shows a Tax Rate" - description: "Displays an TaxRate by id" - operationId: showTaxRate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The TaxRate Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Tax Rate object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaxRate" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - tax_rates - summary: "Updates a tax rate" - description: "Handles the updating of a tax rate by id" - operationId: updateTaxRate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The TaxRate Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the TaxRate object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaxRate" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - tax_rates - summary: "Deletes a TaxRate" - description: "Handles the deletion of an TaxRate by id" - operationId: deleteTaxRate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The TaxRate Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/tax_rates/{id}/edit": - get: - tags: - - tax_rates - summary: "Shows a Tax Rate for editting" - description: "Displays a Tax Rate by id" - operationId: editTaxRate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - name: id - in: path - description: "The TaxRate Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Tax Rate object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/TaxRate" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tax_rates/bulk: - post: - tags: - - tax_rates - summary: "Performs bulk actions on an array of TaxRates" - description: "" - operationId: bulkTaxRates - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Tax Rates" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The TaxRate List response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/templates: - post: - tags: - - templates - summary: "Returns a entity template with the template variables replaced with the Entities" - description: "Returns a entity template with the template variables replaced with the Entities" - operationId: getShowTemplate - parameters: - - $ref: "#/components/parameters/X-Requested-With" - requestBody: - description: "The template subject and body" - required: true - content: - application/json: - schema: - properties: - subject: - description: "The email template subject" - type: string - body: - description: "The email template body" - type: string - type: object - responses: - 200: - description: "The template response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Template" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tokens: - get: - tags: - - tokens - summary: "Gets a list of company tokens" - description: "Lists company tokens.\n *\n * Query parameters can be added to performed more fine grained filtering of the tokens, these are handled by the TokenFilters class which defines the methods available" - operationId: getTokens - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of tokens" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/CompanyToken' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - tokens - summary: "Adds a token" - description: "Adds an token to a company" - operationId: storeToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved token object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/tokens/{id}": - get: - tags: - - tokens - summary: "Shows a token" - description: "Displays a token by id" - operationId: showToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Token Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the token object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - tokens - summary: "Updates a token" - description: "Handles the updating of a token by id" - operationId: updateToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Token Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the token object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - tokens - summary: "Deletes a token" - description: "Handles the deletion of a token by id" - operationId: deleteToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Token Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/tokens/{id}/edit": - get: - tags: - - tokens - summary: "Shows a token for editting" - description: "Displays a token by id" - operationId: editToken - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Token Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the token object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tokens/create: - get: - tags: - - tokens - summary: "Gets a new blank token object" - description: "Returns a blank object with default values" - operationId: getTokensCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank token object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/tokens/bulk: - post: - tags: - - tokens - summary: "Performs bulk actions on an array of tokens" - description: "" - operationId: bulkTokens - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Token ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Token response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/CompanyToken" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/users: - get: - tags: - - users - summary: "Gets a list of users" - description: "Lists users, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the users, these are handled by the UserFilters class which defines the methods available" - operationId: getUsers - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of users" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/User' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - users - summary: "Adds a User" - description: "Adds an User to the system" - operationId: storeUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved User object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/users/create: - get: - tags: - - users - summary: "Gets a new blank User object" - description: "Returns a blank object with default values" - operationId: getUsersCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank User object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/users/{id}": - get: - tags: - - users - summary: "Shows an User" - description: "Displays an User by id" - operationId: showUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The User Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the User object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - users - summary: "Updates an User" - description: "Handles the updating of an User by id" - operationId: updateUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The User Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the User object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - users - summary: "Deletes a User" - description: "Handles the deletion of an User by id" - operationId: deleteUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: token_name - in: query - description: "Customized name for the Users API Token" - required: false - schema: - type: string - format: string - example: "iOS Device 11 iPad" - - name: id - in: path - description: "The User Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/users/{id}/edit": - get: - tags: - - users - summary: "Shows an User for editting" - description: "Displays an User by id" - operationId: editUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The User Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the User object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/users/bulk: - post: - tags: - - users - summary: "Performs bulk actions on an array of users" - description: "" - operationId: bulkUsers - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Hashed ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/User" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/users/{user}/detach_from_company": - delete: - tags: - - users - summary: "Detach an existing user to a company" - description: "Detach an existing user from a company" - operationId: detachUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: user - in: path - description: "The user hashed_id" - required: true - schema: - type: string - format: string - example: FD767dfd7 - responses: - 200: - description: "Success response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/users/{user}/invite": - post: - tags: - - users - summary: "Reconfirm an existing user to a company" - description: "Reconfirm an existing user from a company" - operationId: inviteUser - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: user - in: path - description: "The user hashed_id" - required: true - schema: - type: string - format: string - example: FD767dfd7 - responses: - 200: - description: "Success response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/users/{user}/reconfirm": - post: - tags: - - users - summary: "Reconfirm an existing user to a company" - description: "Reconfirm an existing user from a company" - operationId: inviteUserReconfirm - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: user - in: path - description: "The user hashed_id" - required: true - schema: - type: string - format: string - example: FD767dfd7 - responses: - 200: - description: "Success response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/webcron: - get: - tags: - - webcron - summary: "Executes the task scheduler via a webcron service" - description: "Executes the task scheduler via a webcron service" - operationId: webcron - parameters: - - $ref: "#/components/parameters/X-Requested-With" - responses: - 200: - description: "Success response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/webhooks: - get: - tags: - - webhooks - summary: "Gets a list of Webhooks" - description: "Lists Webhooks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the Webhooks, these are handled by the WebhookFilters class which defines the methods available" - operationId: getWebhooks - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of Webhooks" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Webhook' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - post: - tags: - - webhooks - summary: "Adds a Webhook" - description: "Adds an Webhook to a company" - operationId: storeWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved Webhook object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/webhooks/{id}": - get: - tags: - - webhooks - summary: "Shows a Webhook" - description: "Displays a Webhook by id" - operationId: showWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Webhook Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Webhook object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - put: - tags: - - webhooks - summary: "Updates a Webhook" - description: "Handles the updating of a Webhook by id" - operationId: updateWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Webhook Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Webhook object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - delete: - tags: - - Webhooks - summary: "Deletes a Webhook" - description: "Handles the deletion of a Webhook by id" - operationId: deleteWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Webhook Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - "/api/v1/webhooks/{id}/edit": - get: - tags: - - webhooks - summary: "Shows a Webhook for editting" - description: "Displays a Webhook by id" - operationId: editWebhook - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Webhook Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Webhook object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/webhooks/create: - get: - tags: - - webhooks - summary: "Gets a new blank Webhook object" - description: "Returns a blank object with default values" - operationId: getWebhooksCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank Webhook object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - /api/v1/webhooks/bulk: - post: - tags: - - webhooks - summary: "Performs bulk actions on an array of Webhooks" - description: "" - operationId: bulkWebhooks - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Webhook User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Webhook" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: "#/components/responses/422" - default: - $ref: "#/components/responses/default" - - /api/v1/vendors: - get: - tags: - - vendors - summary: "List vendors" - description: "Lists vendors, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available" - operationId: getVendors - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of vendors" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Vendor' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - vendors - summary: "Create vendor" - description: "Adds a vendor to a company" - operationId: storeVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved clivendorent object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}": - get: - tags: - - vendors - summary: "Show vendor" - description: "Displays a vendor by id" - operationId: showVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - vendors - summary: "Update vendor" - description: "Handles the updating of a vendor by id" - operationId: updateVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - vendors - summary: "Delete vendor" - description: "Handles the deletion of a vendor by id" - operationId: deleteVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/edit": - get: - tags: - - vendors - summary: "Edit vendor" - description: "Displays a vendor by id" - operationId: editVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/vendors/create: - get: - tags: - - vendors - summary: "Blank vendor" - description: "Returns a blank vendor with default values" - operationId: getVendorsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/vendors/bulk: - post: - tags: - - vendors - summary: "Bulk vendor actions" - description: "" - operationId: bulkVendors - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Vendor User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/upload": - post: - tags: - - vendors - summary: "Uploads a vendor document" - description: "Handles the uploading of a document to a vendor" - operationId: uploadVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/products: - get: - tags: - - products - summary: "List products" - description: | - Lists products, search and filters allow fine grained lists to be generated. - Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class - which defines the methods available - operationId: getProducts - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: filter - in: query - description: Filter by product name - required: false - schema: - type: string - example: bob - - name: product_key - in: query - description: Filter by product key - required: false - schema: - type: string - example: bob - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc product_key|desc - responses: - 200: - description: "A list of products" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Product' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - post: - tags: - - products - summary: "Create Product" - description: "Adds a product to a company" - operationId: storeProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: Product object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductRequest' - responses: - 200: - description: "Returns the saved product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - "/api/v1/products/{id}": - get: - tags: - - products - summary: "Show product" - description: "Displays a product by id" - operationId: showProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - put: - tags: - - products - summary: "Update product" - description: "Handles the updating of a product by id" - operationId: updateProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: Product object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductRequest' - responses: - 200: - description: "Returns the Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - delete: - tags: - - products - summary: "Delete product" - description: "Handles the deletion of a product by id" - operationId: deleteProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - "/api/v1/products/{id}/edit": - get: - tags: - - products - summary: "Edit product" - description: "Displays an Product by id" - operationId: editProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - "/api/v1/products/create": - get: - tags: - - products - summary: "Blank product" - description: "Returns a blank product object with default values" - operationId: getProductsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - - /api/v1/products/bulk: - post: - tags: - - products - summary: "Bulk product actions" - description: "Archive / Restore / Delete / Set tax id in bulk" - operationId: bulkProducts - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: 'Bulk action array' - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductBulkAction' - responses: - 200: - description: "The Product response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - - "/api/v1/products/{id}/upload": - post: - tags: - - products - summary: "Add product document" - description: "Handles the uploading of a document to a product" - operationId: uploadProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/client_include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: POST - documents: - type: array - items: - format: binary - responses: - 200: - description: "Returns the Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - - /api/v1/recurring_invoices: - get: - tags: - - Recurring Invoices - summary: "List recurring invoices" - description: | - Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. - - operationId: getRecurringInvoices - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: filter - in: query - description: | - Searches across a range of columns including: - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=bob - - name: client_status - in: query - description: | - A comma separated list of invoice status strings. Valid options include: - - all - - active - - paused - - completed - required: false - schema: - type: string - example: ?client_status=active,paused - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc number|desc balance|asc - responses: - 200: - description: "A list of recurring_invoices" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/RecurringInvoice' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - Recurring Invoices - summary: "Create recurring invoice" - description: "Adds a Recurring Invoice to the system" - operationId: storeRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/recurring_invoices/{id}": - get: - tags: - - Recurring Invoices - summary: "Show recurring invoice" - description: "Displays an RecurringInvoice by id" - operationId: showRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - Recurring Invoices - summary: "Update recurring invoice" - description: "Handles the updating of an RecurringInvoice by id" - operationId: updateRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - Recurring Invoices - summary: "Delete recurring invoice" - description: "Handles the deletion of an RecurringInvoice by id" - operationId: deleteRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/edit": - get: - tags: - - Recurring Invoices - summary: "Edit recurring invoice" - description: "Displays an RecurringInvoice by id" - operationId: editRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - /api/v1/recurring_invoices/create: - get: - tags: - - Recurring Invoices - summary: "Blank recurring invoice" - description: "Returns a blank object with default values" - operationId: getRecurringInvoicesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/recurring_invoices/bulk: - post: - tags: - - Recurring Invoices - summary: "Bulk recurring invoice actions" - description: | - There are multiple actions that are available including: - - operationId: bulkRecurringInvoices - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Bulk action details" - required: true - content: - application/json: - schema: - type: object - properties: - action: - type: string - description: | - The action to be performed, options include: - - `start` - Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed. - If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from. - - `stop` - Stops the recurring invoice. - - `send_now` - Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state. - - `restore` - Restores the recurring invoice from an archived or deleted state. - - `archive` - Archives the recurring invoice. The recurring invoice will not fire in this state. - - `delete` - Deletes a recurring invoice. - ids: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" - type: string - example: - action: start - ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" - responses: - 200: - description: "The RecurringInvoice response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/{action}": - get: - deprecated: true - tags: - - Recurring Invoices - summary: "Custom recurring invoice action" - description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" - operationId: actionRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoice/{invitation_key}/download": - get: - tags: - - Recurring Invoices - summary: "Download recurring invoice PDF" - description: "Downloads a specific invoice" - operationId: downloadRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Recurring Invoice Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the recurring invoice pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/upload": - post: - tags: - - Recurring Invoices - summary: "Add recurring invoice document" - description: "Handles the uploading of a document to a recurring_invoice" - operationId: uploadRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/clients: - get: - tags: - - clients - summary: 'List clients' - description: | - When retrieving a list of clients you can also chain query parameters in order to filter the dataset that is returned. For example, you can send a request to the following URL to retrieve clients that have a balance greater than 1000:\ - - ``` - /api/v1/clients?balance=gt:1000 - ``` - - You can also sort the results by adding a sort parameter. The following example will sort the results by the client name in descending order:\ - - ``` - /api/v1/clients?sort=name|desc - ``` - - You can also combine multiple filters together. The following example will return clients that have a balance greater than 1000 and are not deleted and have a name that starts with "Bob":\ - - ``` - /api/v1/clients?balance=gt:1000&name=Bob* - ``` - - If you wish to retrieve child relations, you can also combine the query parameter `?include=` with a comma separated list of relationships:\ - - ``` - /api/v1/clients?include=activities,ledger,system_logs' - ``` - - The per_page and page variables allow pagination of the list of clients. The following example will return the second page of clients with 15 clients per page:\ - - ``` - /api/v1/clients?per_page=15&page=2 - ``` - - The default per_page value is 20. - - operationId: getClients - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - $ref: '#/components/parameters/index' - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: name - in: query - description: Filter by client name - required: false - schema: - type: string - example: bob - - name: balance - in: query - description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq - required: false - schema: - type: string - example: lt:10 - - name: between_balance - in: query - description: Filter between client balances, format uses two values separated by a colon - required: false - schema: - type: string - example: 10:100 - - name: email - in: query - description: Filter by client email - required: false - schema: - type: string - example: bob@gmail.com - - name: id_number - in: query - description: Filter by client id_number - required: false - schema: - type: string - example: a1039883 - - name: number - in: query - description: Filter by client number - required: false - schema: - type: string - example: a1039883 - - name: filter - in: query - description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 - required: false - schema: - type: string - example: a1039883 - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc name|desc balance|asc - - responses: - 200: - description: 'A list of clients' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - example: - $ref: '#/components/examples/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' - example: - $ref: '#/components/examples/Meta' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - post: - tags: - - clients - summary: 'Create client' - description: | - Adds a client to a company - - When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation. - - operationId: storeClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - requestBody: - description: Client object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ClientRequest' - responses: - 200: - description: 'Returns the saved client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}': - get: - tags: - - clients - summary: 'Show client' - description: 'Displays a client by id' - operationId: showClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - put: - tags: - - clients - summary: 'Update client' - description: 'Handles the updating of a client by id' - operationId: updateClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: Client object that needs to be updated - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ClientRequest' - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - delete: - tags: - - clients - summary: 'Delete client' - description: 'Handles the deletion of a client by id' - operationId: deleteClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: 'Returns a HTTP status' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/edit': - get: - tags: - - clients - summary: 'Edit Client' - description: 'Displays a client by id, essentially an alias of the show route' - operationId: editClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - /api/v1/clients/create: - get: - tags: - - clients - summary: 'Blank Client' - description: 'Returns a blank object with default values' - operationId: getClientsCreate - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - responses: - 200: - description: 'A blank client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - /api/v1/clients/bulk: - post: - tags: - - clients - summary: 'Bulk client actions' - description: 'Archive / Restore / Delete in bulk' - operationId: bulkClients - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/index' - requestBody: - description: 'Bulk action array' - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GenericBulkAction' - - responses: - 200: - description: 'The Client listresponse' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/upload': - post: - tags: - - clients - summary: 'Add client document' - description: 'Handles the uploading of a document to a client, please note due to a quirk in REST you will need to use a _method parameter with value of POST' - operationId: uploadClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: POST - documents: - type: array - items: - format: binary - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/purge': - post: - tags: - - clients - summary: 'Purge client' - description: | - Handles purging a clients. - - Please note this is a destructive action. - - This action will remove all data associated with the client and cannot be undone. - operationId: purgeClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/X-API-PASSWORD' - - $ref: '#/components/parameters/client_include' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge': - post: - tags: - - clients - summary: 'Merge client' - description: | - Handles merging 2 clients - - The id parameter is the client that will be the primary client after the merge has completed. - - The mergeable_client_hashed_id is the client that will be merged into the primary client, this clients records will be updated and associated with the primary client. - operationId: mergeClient - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - $ref: '#/components/parameters/X-API-PASSWORD' - - name: id - in: path - description: 'The Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: mergeable_client_hashed_id - in: path - description: 'The Mergeable Client Hashed ID' - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - /api/v1/client_statement: - post: - tags: - - clients - summary: 'Client statement PDF' - description: 'Return a PDF of the client statement' - operationId: clientStatement - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' - requestBody: - description: 'Statement Options' - required: true - content: - application/json: - schema: - properties: - start_date: - description: 'The start date of the statement period - format Y-m-d' - type: string - end_date: - description: 'The start date of the statement period - format Y-m-d' - type: string - client_id: - description: 'The hashed ID of the client' - type: string - show_payments_table: - description: 'Flag which determines if the payments table is shown' - type: boolean - show_credits_table: - description: 'Flag which determines if the credits table is shown' - type: boolean - show_aging_table: - description: 'Flag which determines if the aging table is shown' - type: boolean - type: object - responses: - 200: - description: 'Returns the client object' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - /api/v1/reactivate_email/{bounce_id}: - post: - tags: - - clients - summary: 'Removes email suppression of a user in the system' - description: 'Emails are suppressed by PostMark, when they receive a Hard bounce / Spam Complaint. This endpoint allows you to remove the suppression and send emails to the user again.' - operationId: reactivateEmail - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' - - name: bounce_id - in: path - description: 'The postmark Bounce ID reference' - required: true - schema: - type: string - format: string - example: 123243 - responses: - 200: - description: 'Success' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - 400: - description: 'Postmark exception - generated if the suppression cannot be removed for any reason' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - /api/v1/clients/{client}/updateTaxData: - post: - tags: - - clients - summary: 'Update tax data' - description: 'Updates the clients tax data - if their address has changed' - operationId: updateClientTaxData - parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' - - name: client - in: path - description: 'The Client Hashed ID reference' - required: true - schema: - type: string - format: string - example: V2J234DFA - responses: - 200: - description: 'Success' - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - 400: - description: 'Postmark exception - generated if the suppression cannot be removed for any reason' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - /api/v1/credits: - get: - tags: - - credits - summary: "List credits" - description: "Lists credits, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the credits, these are handled by the CreditFilters class which defines the methods available" - operationId: getCredits - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of credits" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Credit' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - credits - summary: "Create credit" - description: "Adds an credit to the system" - operationId: storeCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/credits/{id}": - get: - tags: - - credits - summary: "Show credit" - description: "Displays an credit by id" - operationId: showCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - Credits - summary: "Update credit" - description: "Handles the updating of an Credit by id" - operationId: updateCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - credits - summary: "Delete credit" - description: "Handles the deletion of an credit by id" - operationId: deleteCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/credits/{id}/edit": - get: - tags: - - credits - summary: "Edit credit" - description: "Displays an credit by id" - operationId: editCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/credits/create: - get: - tags: - - credits - summary: "Blank credit" - description: "Returns a blank object with default values" - operationId: getCreditsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/credits/bulk: - post: - tags: - - credits - summary: "Bulk credit actions" - description: "" - operationId: bulkCredits - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: string - example: '[D2J234DFA,D2J234DFA,D2J234DFA]' - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/credit/{invitation_key}/download": - get: - tags: - - quotes - summary: "Download quote PDF" - description: "Downloads a specific quote" - operationId: downloadCredit - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Credit Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the credit pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/credits/{id}/upload": - post: - tags: - - credits - summary: "Upload a credit document" - description: "Handles the uploading of a document to a credit" - operationId: uploadCredits - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Credit object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/projects: - get: - tags: - - projects - summary: "List projects" - description: "Lists projects" - operationId: getProjects - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of projects" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Project' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - projects - summary: "Create project" - description: "Adds an project to a company" - operationId: storeProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved project object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}": - get: - tags: - - projects - summary: "Show project" - description: "Displays a project by id" - operationId: showProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the expense object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - projects - summary: "Update project" - description: "Handles the updating of a project by id" - operationId: updateProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the project object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - projects - summary: "Delete project" - description: "Handles the deletion of a project by id" - operationId: deleteProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}/edit": - get: - tags: - - projects - summary: "Edit project" - description: "Displays a project by id" - operationId: editProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the project object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/projects/create: - get: - tags: - - projects - summary: "Blank project" - description: "Returns a blank object with default values" - operationId: getProjectsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank project object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/projects/bulk: - post: - tags: - - projects - summary: "Bulk project actions" - description: "" - operationId: bulkProjects - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Project User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}/upload": - post: - tags: - - projects - summary: "Uploads a project document" - description: "Handles the uploading of a document to a project" - operationId: uploadProject - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Project object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/quotes: - get: - tags: - - quotes - summary: "List quotes" - description: "Lists quotes, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the quotes, these are handled by the QuoteFilters class which defines the methods available" - operationId: getQuotes - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: filter - in: query - description: | - Searches across a range of columns including: - - number - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=bob - - name: client_status - in: query - description: | - A comma separated list of quote status strings. Valid options include: - - all - - draft - - sent - - approved - - expired - - upcoming - required: false - schema: - type: string - example: ?client_status=paid,unpaid - - name: number - in: query - description: | - Search quote by quote number - required: false - schema: - type: string - example: ?number=Q-001 - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc number|desc balance|asc - responses: - 200: - description: "A list of quotes" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Quote' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - quotes - summary: "Create quote" - description: "Adds an Quote to the system" - operationId: storeQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quotes/{id}": - get: - tags: - - quotes - summary: "Show quote" - description: "Displays an Quote by id" - operationId: showQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - quotes - summary: "Update quote" - description: "Handles the updating of an Quote by id" - operationId: updateQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - quotes - summary: "Delete quote" - description: "Handles the deletion of an Quote by id" - operationId: deleteQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/edit": - get: - tags: - - quotes - summary: "Edit quote" - description: "Displays an Quote by id" - operationId: editQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/quotes/create: - get: - tags: - - quotes - summary: "Blank quote" - description: "Returns a blank object with default values" - operationId: getQuotesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/quotes/bulk: - post: - tags: - - quotes - summary: "Bulk quote actions" - description: "" - operationId: bulkQuotes - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Hashed ids" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Quote response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/{action}": - get: - deprecated: true - tags: - - quotes - summary: "Performs a custom action on an Quote" - description: "Performs a custom action on an Quote.\n\n The current range of actions are as follows\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - convert\n - convert_to_invoice\n - email" - operationId: actionQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quote/{invitation_key}/download": - get: - tags: - - quotes - summary: "Download quote PDF" - description: "Downloads a specific quote" - operationId: downloadQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Quote Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the quote pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/upload": - post: - tags: - - quotes - summary: "Upload a quote document" - description: "Handles the uploading of a document to a quote" - operationId: uploadQuote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Quote object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/invoices: - get: - tags: - - invoices - summary: "List invoices" - description: | - Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. - - operationId: getInvoices - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: client_status - in: query - description: | - A comma separated list of invoice status strings. Valid options include: - - all - - paid - - unpaid - - overdue - required: false - schema: - type: string - example: ?client_status=paid,unpaid - - name: number - in: query - description: | - Search invoices by invoice number - required: false - schema: - type: string - example: ?number=INV-001 - - name: filter - in: query - description: | - Searches across a range of columns including: - - number - - po_number - - date - - amount - - balance - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=bob - - name: without_deleted_clients - in: query - description: | - Returns the invoice list without the invoices of deleted clients. - required: false - schema: - type: string - example: ?without_deleted_clients= - - name: overdue - in: query - description: | - Returns the list of invoices that are overdue - required: false - schema: - type: string - example: ?over_due= - - name: payable - in: query - description: | - Returns the invoice list that are payable for a defined client. Please note, you must pass the client_id as the value for this query parameter - required: false - schema: - type: string - example: ?payable={client_id} - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc number|desc balance|asc - - name: private_notes - in: query - description: | - Searches on the private_notes field of the invoices - required: false - schema: - type: string - example: ?private_notes=super secret - responses: - 200: - description: "A list of invoices" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Invoice' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - invoices - summary: "Create invoice" - description: | - Adds a invoice to a company - - Triggered actions are available when updating or creating an invoice. - These are query parameters that can be chained in order to perform additional actions on the entity, these include: - - ``` - ?send_email=true [Saves and sends the invoice] - ?mark_sent=true [Saves and marks the invoice as sent] - ?paid=true [Saves and marks the invoice as paid] - ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] - ?cancel=true [Saves and marks the invoice as cancelled] - ?save_default_footer=true [Saves the current footer as the default footer] - ?save_default_terms=true [Saves the current terms as the default terms] - ``` - - operationId: storeInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/InvoiceRequest" - responses: - 200: - description: "Returns the saved invoice entity" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/invoices/{id}": - get: - tags: - - invoices - summary: "Show invoice" - description: "Displays an invoice by id" - operationId: showInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - put: - tags: - - invoices - summary: "Update invoice" - description: | - Handles the updating of an invoice by id. - - Triggered actions are available when updating or creating an invoice. - These are query parameters that can be chained in order to perform additional actions on the entity, these include: - - ``` - ?send_email=true [Saves and sends the invoice] - ?mark_sent=true [Saves and marks the invoice as sent] - ?paid=true [Saves and marks the invoice as paid] - ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] - ?cancel=true [Saves and marks the invoice as cancelled] - ?save_default_footer=true [Saves the current footer as the default footer] - ?save_default_terms=true [Saves the current terms as the default terms] - ``` - - operationId: updateInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - invoices - summary: "Delete invoice" - description: "Handles the deletion of an invoice by id" - operationId: deleteInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/edit": - get: - tags: - - invoices - summary: "Edit invoice" - description: "Displays an invoice by id for editting" - operationId: editInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - /api/v1/invoices/create: - get: - tags: - - invoices - summary: "Blank invoice" - description: "Returns a blank object with default values" - operationId: getInvoicesCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - /api/v1/invoices/bulk: - post: - tags: - - invoices - summary: "Bulk invoice actions" - description: | - There are multiple actions that are available including: - - operationId: bulkInvoices - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Bulk action details" - required: true - content: - application/json: - schema: - type: object - properties: - action: + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/actvities/download_entity/{activity_id}": + get: + tags: + - actvities + summary: "Returns a PDF for the given activity" + description: "Returns a PDF for the given activity" + operationId: getActivityHistoricalEntityPdf + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/activity_include" + - name: activity_id + in: path + description: "The Activity Hashed ID" required: true - type: string - description: | - The action to be performed, options include: - - `bulk_download` - Bulk download an array of invoice PDFs (These are sent to the admin via email.) - - `download` - Download a single PDF. (Returns a single PDF object) - - `bulk_print` - Merges an array of Invoice PDFs for easy one click printing. - - `auto_bill` - Attempts to automatically bill the invoices with the payment method on file. - - `clone_to_invoice` - Returns a clone of the invoice. - - `clone_to_quote` - Returns a quote cloned using the properties of the given invoice. - - `mark_paid` - Marks an array of invoices as paid. - - `mark_sent` - Marks an array of invoices as sent. - - `restore` - Restores an array of invoices - - `delete` - Deletes an array of invoices - - `archive` - Archives an array of invoices - - `cancel` - Cancels an array of invoices - - `email` - Emails an array of invoices - - `send_email` - Emails an array of invoices. Requires additional properties to be sent. `email_type` - ids: + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "PDF File" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 404: + description: "No file exists for the given record" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/login: + post: + tags: + - login + summary: "Attempts authentication" + description: "Returns a CompanyUser object on success" + operationId: postLogin + security: + - [] + parameters: + - $ref: "#/components/parameters/X-API-SECRET" + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/login_include" + - $ref: "#/components/parameters/include_static" + - $ref: "#/components/parameters/clear_cache" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + properties: + email: + description: "The users email address." + type: string + example: "demo@invoiceninja.com" + password: + description: "The user password. Must meet minimum criteria ~ > 6 characters" + type: string + example: "Password0" + type: object + responses: + 200: + description: "Returns the company user object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 5XX: + $ref: "#/components/responses/5XX" + default: + $ref: "#/components/responses/default" + /api/v1/refresh: + post: + tags: + - refresh + summary: "Refresh data by timestamp" + description: | + Refreshes the dataset. + + This endpoint can be used if you only need to access the most recent data from a certain point in time. + operationId: refresh + parameters: + - name: updated_at + in: query + description: "The unix timestamp from which the refreshed data should be sent from, if no value is passed the system will assume you require all data." required: true - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" - type: string - example: - action: bulk_download - ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" - - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" + schema: + type: number + format: integer + example: 1676173763 + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/include_static" + - $ref: "#/components/parameters/clear_cache" + responses: + 200: + description: "The Company User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyUser" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/yodlee/refresh: + post: + tags: + - yodlee + summary: "Yodlee Webhook" + description: "Webhook endpoint for Yodlee. Used to notify the system that a data point can be updated." + operationId: yodleeRefreshWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations: + get: + tags: + - bank_integrations + summary: "Returns a list of Bank Integrations" + description: "Lists all bank integrations" + operationId: getBankIntegrations + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/bank_integration_include" + - $ref: "#/components/parameters/index" + - name: rows + in: query + description: "The number of bank integrations to return" + required: false + schema: + type: number + format: integer + example: "50" + responses: + 200: + description: "A list of bank integrations" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/BankIntegration" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - bank_integrations + summary: "Adds a bank_integration" + description: "Adds an bank_integration to a company" + operationId: storeBankIntegration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_integrations/{id}": + get: + tags: + - bank_integrations + summary: "Shows a bank_integration" + description: "Displays a bank_integration by id" + operationId: showBankIntegration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankIntegration Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - bank_integrations + summary: "Updates a bank_integration" + description: "Handles the updating of a bank_integration by id" + operationId: updateBankIntegration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankIntegration Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - bank_integrations + summary: "Deletes a bank_integration" + description: "Handles the deletion of a bank_integration by id" + operationId: deleteBankIntegration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankIntegration Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_integrations/{id}/edit": + get: + tags: + - bank_integrations + summary: "Shows a bank_integration for editing" + description: "Displays a bank_integration by id" + operationId: editBankIntegration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankIntegration Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations/create: + get: + tags: + - bank_integrations + summary: "Gets a new blank bank_integration object" + description: "Returns a blank object with default values" + operationId: getBankIntegrationsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations/bulk: + post: + tags: + - bank_integrations + summary: "Performs bulk actions on an array of bank_integrations" + description: "" + operationId: bulkBankIntegrations + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Action paramters" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations/refresh_accounts: + post: + tags: + - bank_integrations + summary: "Gets the list of accounts from the remote server" + description: "Adds an bank_integration to a company" + operationId: getRefreshAccounts + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations/remove_account/account_id: + post: + tags: + - bank_integrations + summary: "Removes an account from the integration" + description: "Removes an account from the integration" + operationId: getRemoveAccount + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the bank_integration object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_integrations/get_transactions/account_id: + post: + tags: + - bank_integrations + summary: "Retrieve transactions for a account" + description: "Retrieve transactions for a account" + operationId: getAccountTransactions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Retrieve transactions for a account" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankIntegration" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transactions: + get: + tags: + - bank_transactions + summary: "Gets a list of bank_transactions" + description: "Lists all bank integrations" + operationId: getBankTransactions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + - name: rows + in: query + description: "The number of bank integrations to return" + required: false + schema: + type: number + format: integer + example: "50" + responses: + 200: + description: "A list of bank integrations" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/BankTransaction" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - bank_transactions + summary: "Adds a bank_transaction" + description: "Adds an bank_transaction to a company" + operationId: storeBankTransaction + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved bank_transaction object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransaction" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_transactions/{id}": + get: + tags: + - bank_transactions + summary: "Shows a bank_transaction" + description: "Displays a bank_transaction by id" + operationId: showBankTransaction + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankTransaction Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransaction" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - bank_transactions + summary: "Updates a bank_transaction" + description: "Handles the updating of a bank_transaction by id" + operationId: updateBankTransaction + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankTransaction Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransaction" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - bank_transactions + summary: "Deletes a bank_transaction" + description: "Handles the deletion of a bank_transaction by id" + operationId: deleteBankTransaction + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankTransaction Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_transactions/{id}/edit": + get: + tags: + - bank_transactions + summary: "Shows a bank_transaction for editing" + description: "Displays a bank_transaction by id" + operationId: editBankTransaction + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The BankTransaction Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransaction" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transactions/create: + get: + tags: + - bank_transactions + summary: "Gets a new blank bank_transaction object" + description: "Returns a blank object with default values" + operationId: getBankTransactionsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank bank_transaction object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransaction" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transations/bulk: + post: + tags: + - bank_transactions + summary: "Performs bulk actions on an array of bank_transations" + description: "" + operationId: bulkBankTransactions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Action paramters" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transations/match: + post: + tags: + - bank_transactions + summary: "Performs match actions on an array of bank_transactions" + description: "" + operationId: matchBankTransactions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Action paramters" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transaction_rules: + get: + tags: + - bank_transaction_rules + summary: "Gets a list of bank_transaction_rules" + description: "Lists all bank transaction rules" + operationId: getBankTransactionRules + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + - name: rows + in: query + description: "The number of bank integrations to return" + required: false + schema: + type: number + format: integer + example: "50" + responses: + 200: + description: "A list of bank integrations" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/BankTransactionRule" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - bank_transaction_rules + summary: "Adds a bank_transaction rule" + description: "Adds an bank_transaction to a company" + operationId: storeBankTransactionRule + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved bank_transaction rule object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransactionRule" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_transaction_rules/{id}": + get: + tags: + - bank_transaction_rules + summary: "Shows a bank_transaction" + description: "Displays a bank_transaction by id" + operationId: showBankTransactionRule + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Bank Transaction RuleHashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction rule object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransactionRule" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - bank_transaction_rules + summary: "Updates a bank_transaction Rule" + description: "Handles the updating of a bank_transaction rule by id" + operationId: updateBankTransactionRule + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Bank Transaction Rule Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction rule object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransactionRule" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - bank_transaction_rules + summary: "Deletes a bank_transaction rule" + description: "Handles the deletion of a bank_transaction rule by id" + operationId: deleteBankTransactionRule + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Bank Transaction Rule Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/bank_transaction_rules/{id}/edit": + get: + tags: + - bank_transaction_rules + summary: "Shows a bank_transaction for editing" + description: "Displays a bank_transaction by id" + operationId: editBankTransactionRule + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Bank Transaction Rule Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the bank_transaction rule object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransactionRule" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transaction_rules/create: + get: + tags: + - bank_transaction_rules + summary: "Gets a new blank bank_transaction rule object" + description: "Returns a blank object with default values" + operationId: getBankTransactionRulesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank bank_transaction rule object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/BankTransactionRule" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/bank_transation_rules/bulk: + post: + tags: + - bank_transaction_rules + summary: "Performs bulk actions on an array of bank_transation rules" + description: "" + operationId: bulkBankTransactionRules + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Action paramters" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/charts/totals: + post: + tags: + - charts + summary: "Get chart data" + description: "Get chart data" + operationId: getChartTotals + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + - name: rows + in: query + description: "The chart" + required: false + schema: + type: number + format: integer + example: "50" + responses: + 200: + description: "json dataset of chart data" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/{action}": - get: - deprecated: true - tags: - - invoices - summary: "Custom invoice action" - description: | - Performs a custom action on an invoice. - The current range of actions are as follows - - clone_to_invoice - - clone_to_quote - - history - - delivery_note - - mark_paid - - download - - archive - - delete - - email - operationId: actionInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/invoice/{invitation_key}/download": - get: - tags: - - invoices - summary: "Download invoice PDF" - description: "Downloads a specific invoice" - operationId: downloadInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Invoice Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/delivery_note": - get: - tags: - - invoices - summary: "Download delivery note" - description: "Downloads a specific invoice delivery notes" - operationId: deliveryNote - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hahsed Id" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice delivery note pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/upload": - post: - tags: - - invoices - summary: "Add invoice document" - description: "Handles the uploading of a document to a invoice" - operationId: uploadInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Invoice object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Invoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/payments: - get: - tags: - - payments - summary: "List payments" - description: "Lists payments, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the payments, these are handled by the PaymentFilters class which defines the methods available" - operationId: getPayments - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: filter - in: query - description: | - Searches across a range of columns including: - - amount - - date - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=10 - - name: number - in: query - description: | - Search payments by payment number - required: false - schema: - type: string - example: ?number=0001 - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc number|desc balance|asc - responses: - 200: - description: "A list of payments" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Payment' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - payments - summary: "Create payment" - description: "Adds an Payment to the system" - operationId: storePayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: "The payment request" - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - responses: - 200: - description: "Returns the saved Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/payments/{id}": - get: - tags: - - payments - summary: "Show payment" - description: "Displays an Payment by id" - operationId: showPayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - payments - summary: "Update payment" - description: "Handles the updating of an Payment by id" - operationId: updatePayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - payments - summary: "Delete payment" - description: "Handles the deletion of an Payment by id" - operationId: deletePayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/payments/{id}/edit": - get: - tags: - - payments - summary: "Edit payment" - description: "Displays an Payment by id" - operationId: editPayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/payments/create: - get: - tags: - - payments - summary: "Blank payment" - description: "Returns a blank object with default values" - operationId: getPaymentsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/payments/refund: - post: - tags: - - payments - summary: "Refund payment" - description: "Adds an Refund to the system" - operationId: storeRefund - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - requestBody: - description: "The refund request" - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - responses: - 200: - description: "Returns the saved Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/payments/bulk: - post: - tags: - - payments - summary: "Bulk payment actions" - description: "" - operationId: bulkPayments - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Payment response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/payments/{id}/{action}": - get: - deprecated: true - tags: - - payments - summary: "Custom payment actions" - description: "Performs a custom action on an Payment.\n\n The current range of actions are as follows\n - clone_to_Payment\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" - operationId: actionPayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/payments/{id}/upload": - post: - tags: - - payments - summary: "Upload a payment document" - description: "Handles the uploading of a document to a payment" - operationId: uploadPayment - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Payment Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Payment object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/purchase_orders: - get: - tags: - - Purchase Orders - summary: "List purchase orders" - description: "Lists purchase orders, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available" - operationId: getPurchaseOrders - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of purchase orders" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/PurchaseOrder' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - Purchase Orders - summary: "Create purchase order" - description: "Adds an purchase order to the system" - operationId: storePurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - "/api/v1/purchase_orders/{id}": - get: - tags: - - Purchase Orders - summary: "Show purchase order" - description: "Displays an purchase order by id" - operationId: showPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Purchase order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_order/{id}": - put: - tags: - - Purchase Orders - summary: "Update purchase order" - description: "Handles the updating of an purchase order by id" - operationId: updatePurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The purchase order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - Purchase Orders - summary: "Delete purchase order" - description: "Handles the deletion of an purchase orders by id" - operationId: deletePurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The purhcase order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/edit": - get: - tags: - - Purchase Orders - summary: "Edit purchase order" - description: "Displays an purchase order by id" - operationId: editPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The purchase order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - - /api/v1/purchase_orders/create: - get: - tags: - - Purchase Orders - summary: "Blank purchase order" - description: "Returns a blank object with default values" - operationId: getPurchaseOrderCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/purchase_orders/bulk: - post: - tags: - - Purchase Orders - summary: "Bulk purchase order action" - description: "" - operationId: bulkPurchaseOrderss - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "Purchase Order IDS" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Bulk Action response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/{action}": - get: - deprecated: true - tags: - - Purchase Orders - summary: "Custom purchase order actions" - description: "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email" - operationId: actionPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Purchase Order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the purchase order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/upload": - post: - tags: - - Purchase Orders - summary: "Uploads a purchase order document" - description: "Handles the uploading of a document to a purchase_order" - operationId: uploadPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Purchase Order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Purchase Order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/PurchaseOrder" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_order/{invitation_key}/download": - get: - tags: - - Purchase Orders - summary: "Download a purchase order PDF" - description: "Downloads a specific purchase order" - operationId: downloadPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Purchase Order Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Purchase Order pdf" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/tasks: - get: - tags: - - tasks - summary: "List tasks" - description: "Lists tasks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available" - operationId: getTasks - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of tasks" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Task' - meta: - type: object - $ref: '#/components/schemas/Meta' - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - post: - tags: - - tasks - summary: "Create task" - description: "Adds an task to a company" - operationId: storeTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved task object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/tasks/{id}": - get: - tags: - - tasks - summary: "Show task" - description: "Displays a task by id" - operationId: showTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the task object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - tasks - summary: "Update task" - description: "Handles the updating of a task by id" - operationId: updateTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the task object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - tasks - summary: "Delete task" - description: "Handles the deletion of a task by id" - operationId: deleteTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/tasks/{id}/edit": - get: - tags: - - tasks - summary: "Edit task" - description: "Displays a task by id" - operationId: editTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/tasks/create: - get: - tags: - - tasks - summary: "Blank task" - description: "Returns a blank task with default values" - operationId: getTasksCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank task object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/tasks/bulk: - post: - tags: - - tasks - summary: "Bulk task actions" - description: "" - operationId: bulkTasks - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Task User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/tasks/{id}/upload": - post: - tags: - - tasks - summary: "Uploads a task document" - description: "Handles the uploading of a document to a task" - operationId: uploadTask - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: - description: "Array of binary documents for upload" - type: string - format: binary - responses: - 200: - description: "Returns the Task object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/tasks/sort: - post: - tags: - - tasks - summary: "Sort tasks on KanBan" - description: "Sorts tasks after drag and drop on the KanBan." - operationId: sortTasks - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns an Ok, 200 HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" -components: - headers: - X-MINIMUM-CLIENT-VERSION: - description: 'The API version' - schema: - type: number - X-RateLimit-Remaining: - description: 'The number of requests left for the time window.' - schema: - type: integer - X-RateLimit-Limit: - description: 'The total number of requests in a given time window.' - schema: - type: integer - components: - securitySchemes: - ApiKeyAuth: - type: apiKey - in: header - name: X-API-TOKEN - responses: - examples: - Client: - - id: Opnel5aKBz - user_id: Ua6Rw4pVbS - assigned_user_id: Ua6Rw4pVbS - company_id: Co7Vn3yLmW - name: "Jim's Housekeeping" - website: https://www.jims-housekeeping.com - private_notes: Client prefers email communication over phone calls - client_hash: asdfkjhk342hjhbfdvmnfb1 - industry_id: 5 - size_id: 2 - address1: 123 Main St - address2: Apt 4B - city: Beverly Hills - state: California - postal_code: 90210 - phone: 555-3434-3434 - country_id: 1 - custom_value1: Email - custom_value2: John Doe - custom_value3: Yes - custom_value4: $50,000 - vat_number: VAT123456 - id_number: ID123456 - number: CL-0001 - shipping_address1: 5 Wallaby Way - shipping_address2: Suite 5 - shipping_city: Perth - shipping_state: Western Australia - shipping_postal_code: 6110 - shipping_country_id: 4 - is_deleted: false - balance: 500.00 - paid_to_date: 2000.00 - credit_balance: 100.00 - last_login: 1628686031 - created_at: 1617629031 - updated_at: 1628445631 - group_settings_id: Opnel5aKBz - routing_id: Opnel5aKBz3489-dfkiu-2239-sdsd - is_tax_exempt: false - has_valid_vat_number: false - payment_balance: 100 - contacts: - - id: Opnel5aKBz - first_name: John - last_name: Doe - email: jim@gmail.com - phone: 555-3434-3434 - send_invoice: true - custom_value1: Email - custom_value2: John Doe - custom_value3: Yes - custom_value4: $50,000 - is_primary: true - created_at: 1617629031 - updated_at: 1628445631 - deleted_at: 1628445631 - Meta: - value: - pagination: - total: 1 - count: 1 - per_page: 20 - current_page: 1 - total_pages: 1 - links: - - first: https://invoicing.co/api/v1/invoices?page=1 - - last: https://invoicing.co/api/v1/invoices?page=1 - - prev: null - - next: null - 403: - description: 'Authorization error' - content: - application/json: - schema: - $ref: '#components/schemas/AuthorizationError' + /api/v1/client_gateway_tokens: + get: + tags: + - client_gateway_tokens + summary: "List of client tokens" + description: "Lists client_gateway_tokens, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the client_gateway_tokens, these are handled by the ClientGatewayTokenFilters class which defines the methods available" + operationId: getClientGatewayTokens + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of client_gateway_tokens" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ClientGatewayToken" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - client_gateway_tokens + summary: "Adds a client" + description: "Adds an client to a company" + operationId: storeClientGatewayToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ClientGatewayToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/client_gateway_tokens/{id}": + get: + tags: + - client_gateway_tokens + summary: "Shows a client" + description: "Displays a client by id" + operationId: showClientGatewayToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The ClientGatewayToken Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the cl.ient object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ClientGatewayToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - client_gateway_tokens + summary: "Updates a client" + description: "Handles the updating of a client by id" + operationId: updateClientGatewayToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The ClientGatewayToken Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ClientGatewayToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - client_gateway_tokens + summary: "Deletes a client" + description: "Handles the deletion of a client by id" + operationId: deleteClientGatewayToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The ClientGatewayToken Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/client_gateway_tokens/{id}/edit": + get: + tags: + - client_gateway_tokens + summary: "Shows a client for editting" + description: "Displays a client by id" + operationId: editClientGatewayToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The ClientGatewayToken Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ClientGatewayToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/client_gateway_tokens/create: + get: + tags: + - client_gateway_tokens + summary: "Gets a new blank client object" + description: "Returns a blank object with default values" + operationId: getClientGatewayTokensCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ClientGatewayToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" - default: - description: 'Unexpected Error' - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - 429: - description: 'Rate Limit Exceeded' - content: - application/json: - schema: - $ref: '#/components/schemas/RateLimiterError' - 422: - description: 'Validation error' - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - 401: - description: 'Authentication error' - content: - application/json: - schema: - $ref: '#components/schemas/AuthenticationError' - 400: - description: 'Invalid user input' - content: - application/json: - schema: - $ref: '#components/schemas/InvalidInputError' - parameters: - X-API-SECRET: - name: X-API-SECRET - in: header - description: 'The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route.' - required: false - schema: - type: string - example: password - X-Requested-With: - name: X-Requested-With - in: header - description: 'Used to send the XMLHttpRequest header' - required: true - schema: - type: string - readOnly: true - example: XMLHttpRequest - X-API-TOKEN: - name: X-API-TOKEN - in: header - description: 'The API token to be used for authentication' - required: true - schema: - type: string - example: TOKEN - X-API-PASSWORD: - name: X-API-PASSWORD - in: header - description: 'The login password when challenged on certain protected routes' - required: true - schema: - type: string - example: supersecretpassword - bank_integration_include: - name: include - in: query - description: Include child relations of the BankIntegration object. Format is comma separated. - required: false - schema: - type: string - examples: - company: - value: company - summary: The associated Company - account: - value: account - summary: The associated Account - bank_transactions: - value: bank_transactions - summary: The associated Bank Transactions - client_include: - name: include - in: query - description: Include child relationships of the Client Object. - required: false - schema: - type: string - examples: - activities: - value: activities - summary: include=activities will include the activities object in the response - ledger: - value: ledger - summary: include=ledger will include the ledger object in the response - system_logs: - value: system_logs - summary: include=system_logs will include the system_logs object in the response - activity_include: - name: include - in: query - description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token - required: false - schema: - type: string - examples: - history: - value: history - summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity) - user: - value: user - summary: include=user will include the user object in the response - client: - value: client - summary: include=client will include the client object in the response - recurring_invoice: - value: recurring_invoice - summary: include=recurring_invoice will include the recurring_invoice object in the response - invoice: - value: invoice - summary: include=invoice will include the invoice object in the response - credit: - value: credit - summary: include=credit will include the credit object in the response - quote: - value: quote - summary: include=quote will include the quote object in the response - payment: - value: payment - summary: include=payment will include the payment object in the response - expense: - value: expense - summary: include=expense will include the expense object in the response - vendor_contact: - value: vendor_contact - summary: include=vendor_contact will include the vendor_contact object in the response - vendor: - value: vendor - summary: include=vendor will include the vendor object in the response - purchase_order: - value: purchase_order - summary: include=purchase_order will include the purchase_order object in the response - task: - value: task - summary: include=task will include the task object in the response - login_include: - name: include - in: query - description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token - required: false - schema: - type: string - examples: - user: - value: user - summary: include=user will include the user object in the response - company: - value: company - summary: include=company will include the company object in the response - token: - value: token - summary: include=token will include the token object in the response - account: - value: account - summary: include=account will include the account object in the response - per_page_meta: - name: per_page - in: query - description: The number of records to return for each request, default is 20 - required: false - schema: - type: int - example: 20 - page_meta: - name: page - in: query - description: The page number to return for this request (when performing pagination), default is 1 - required: false - schema: - type: int - example: 1 - include: - name: include - in: query - description: 'Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes' - required: false - schema: - type: string - example: 'first_load' - include_static: - name: include_static - in: query - description: 'Returns static variables' - required: false - schema: - type: string - example: include_static=true - clear_cache: - name: clear_cache - in: query - description: 'Clears the static cache' - required: false - schema: - type: string - example: clear_cache=true - index: - name: index - in: query - description: 'Replaces the default response index from data to a user specific string' - required: false - schema: - type: string - example: user - api_version: - name: api_version - in: query - description: 'The API version' - required: false - schema: - type: number - example: user - -########################### Generic filters available across all filter ################################## - status: - name: status - in: query - description: | - Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options: - - active - - archived - - deleted - required: false - schema: - type: string - example: ?status=archived,deleted - client_id: - name: client_id - in: query - description: | - Filters the entity list by client_id. Suitable when you only want the entities of a specific client. - required: false - schema: - type: string - example: ?client_id={client_id} - created_at: - name: created_at - in: query - description: | - Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp - required: false - schema: - type: integer - example: ?created_at=2022-01-10 - updated_at: - name: updated_at - in: query - description: | - Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp - required: false - schema: - type: integer - example: ?updated_at=2022-01-10 - is_deleted: - name: is_deleted - in: query - description: | - Filters the entity list by entities that have been deleted. - required: false - schema: - type: booleans - example: ?is_deleted=true - vendor_id: - name: vendor_id - in: query - description: | - Filters the entity list by an associated vendor - required: false - schema: - type: string - example: ?vendor_id={vendor_id} - filter_deleted_clients: - name: filter_deleted_clients - in: query - description: | - Filters the entity list and only returns entities for clients that have not been deleted - required: false - schema: - type: string - example: ?filter_deleted_clients=true - ########################### Generic filters available across all filter ################################## + /api/v1/companies: + get: + tags: + - companies + summary: "Gets a list of companies" + description: "Lists companies, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the companies, these are handled by the CompanyFilters class which defines the methods available" + operationId: getCompanies + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of companies" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Company" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - companies + summary: "Adds a company" + description: "Adds an company to the system" + operationId: storeCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/companies/create: + get: + tags: + - companies + summary: "Gets a new blank company object" + description: "Returns a blank object with default values" + operationId: getCompaniesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/companies/{id}": + get: + tags: + - companies + summary: "Shows an company" + description: "Displays an company by id" + operationId: showCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - companies + summary: "Updates an company" + description: "Handles the updating of an company by id" + operationId: updateCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - schemas: - CreditPaymentable: - properties: - credit_id: - description: 'The credit hashed id' - type: string - example: Opnel5aKBz - amount: - description: 'The credit amount' - type: string - example: '2' - type: object - GenericReportSchema: - properties: - date_range: - description: 'The string representation of the date range of data to be returned' - type: string - example: last7 - date_key: - description: 'The date column to search between.' - type: string - example: created_at - start_date: - description: 'The start date to search between' - type: string - example: '2000-10-31' - end_date: - description: 'The end date to search between' - type: string - example: '2' - report_keys: - type: array - items: - description: 'Array of Keys to export' - type: string - example: '[''name'',''date'']' - type: object - GroupSetting: - properties: - id: - description: 'The group setting hashed id' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - name: - description: 'The name of the group' - type: string - example: 'A groupies group' - settings: - description: 'The settings object' - type: object - example: '' - type: object - InvoicePaymentable: - properties: - invoice_id: - description: ______ - type: string - example: Opnel5aKBz - amount: - description: ______ - type: string - example: '2' - type: object - - + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - companies + summary: "Deletes a company" + description: "Handles the deletion of an company by id" + operationId: deleteCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/companies/{id}/edit": + get: + tags: + - companies + summary: "Shows an company for editting" + description: "Displays an company by id" + operationId: editCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/companies/{id}/upload": + post: + tags: + - companies + summary: "Uploads a document to a company" + description: "Handles the uploading of a document to a company" + operationId: uploadCompanies + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/companies/{company}/default": + post: + tags: + - companies + summary: "Sets the company as the default company." + description: "Sets the company as the default company." + operationId: setDefaultCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: company + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the company object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Company" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - TaskSchedulerSchema: - properties: - paused: - description: 'The scheduler paused state' - type: boolean - example: 'false' - repeat_every: - description: 'Accepted values (DAY,WEEK,MONTH,3MONTHS,YEAR)' - type: string - example: DAY - start_from: - description: 'Timestamp when we should start the scheduler, default is today' - type: integer - example: '1652898504' - job: - description: 'Job, we can find list of available jobs in Scheduler model' - type: string - example: create_credit_report - date_range: - description: 'The string representation of the date range of data to be returned' - type: string - example: last7 - date_key: - description: 'The date column to search between.' - type: string - example: created_at - start_date: - description: 'The start date to search between' - type: string - example: '2022-10-31' - end_date: - description: 'The end date to search between' - type: string - example: '2022-10-31' - report_keys: - type: array - items: - description: 'Array of Keys to export' - type: string - example: '[''name'',''date'']' - type: object - UpdateTaskSchedulerSchema: - properties: - paused: - description: 'The scheduler paused state' - type: boolean - example: 'false' - repeat_every: - description: 'Accepted values (DAY,WEEK,MONTH,3MONTHS,YEAR)' - type: string - example: DAY - start_from: - description: 'Timestamp when we should start the scheduler, default is today' - type: integer - example: '1652898504' - job: - description: 'Job, we can find list of available jobs in Scheduler model' - type: string - example: create_credit_report - date_range: - description: 'The string representation of the date range of data to be returned' - type: string - example: last7 - date_key: - description: 'The date column to search between.' - type: string - example: created_at - start_date: - description: 'The start date to search between' - type: string - example: '2022-10-31' - end_date: - description: 'The end date to search between' - type: string - example: '2022-10-31' - type: object - UpdateJobForASchedulerSchema: - properties: - job: - description: 'Set action name, action names can be found in Scheduler Model' - type: string - example: create_client_report - type: object - - TaskStatus: - properties: - id: - description: 'The task status hashed id' - type: string - example: Opnel5aKBz - readOnly: true - name: - description: 'The task status name' - type: string - example: Backlog - color: - description: 'The task status color - hex value' - type: string - example: '#000000' - task_status_order: - description: 'The order of the task status' - type: integer - example: '4' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - is_deleted: - description: 'A boolean flag determining if the task status has been deleted' - type: boolean - example: true - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - archived_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - type: object - TaxRate: - properties: - id: - description: 'Thie hashed id of the tax' - type: string - example: Opnel5aKBz - readOnly: true - name: - description: 'The tax name' - type: string - example: GST - rate: - description: 'The tax rate' - type: number - example: '10' - is_deleted: - description: 'Boolean flag determining if the tax has been deleted' - type: boolean - example: true - type: object - Template: - properties: - html: - description: 'The template HTML' - type: string - example: '' - type: object - - AuthenticationError: - type: object - properties: - message: - description: 'These credentials do not match our records / Invalid Token' - type: string - example: 'These credentials do not match our records / Invalid Token' - ValidationError: - properties: - message: - description: 'The error message' - type: string - example: 'The given data was invalid.' - errors: - properties: - value: - type: array - items: - type: string - type: object - type: object - AuthorizationError: - properties: - message: - description: 'Insufficient permissions for this resource.' - type: string - example: 'Insufficient permissions for this resource.' - errors: - properties: - value: - type: array - items: - type: string - type: object - type: object - RateLimiterError: - properties: - message: - description: 'Rate limit exceeded.' - type: string - example: 'Rate limit exceeded.' - errors: - properties: - value: - type: array - items: - type: string - type: object - type: object - InvalidInputError: - properties: - message: - description: 'Invalid input' - type: string - example: 'Invalid input' - errors: - properties: - value: - type: array - items: - type: string - type: object - type: object - Webhook: - properties: - id: - description: 'The subscription hashed id' - type: string - example: AS3df3A - event_id: - description: 'The subscription event id' - type: string - example: AS3df3A - target_url: - description: 'The api endpoint' - type: string - example: AS3df3A - format: - description: 'JSON or UBL' - type: string - example: JSON - type: object - Credit: - properties: - id: - description: "The unique hashed ID of the credit" - type: string - example: Opnel5aKBz - user_id: - description: "The unique hashed ID of the user associated with the credit" - type: string - example: 1a2b3c4d5e - assigned_user_id: - description: "The unique hashed ID of the assigned user responsible for the credit" - type: string - example: 6f7g8h9i0j - company_id: - description: "The unique hashed ID of the company associated with the credit" - type: string - example: k1l2m3n4o5 - client_id: - description: "The unique hashed ID of the client associated with the credit" - type: string - example: p1q2r3s4t5 - status_id: - description: "The ID representing the current status of the credit" - type: string - example: 3 - invoice_id: - description: "The unique hashed ID of the linked invoice to which the credit is applied" - type: string - example: u1v2w3x4y5 - number: - description: "The unique alphanumeric credit number per company" - type: string - example: QUOTE_101 - po_number: - description: "The purchase order number referred to by the credit" - type: string - example: PO_12345 - terms: - description: "The terms associated with the credit" - type: string - example: "Net 30" - public_notes: - description: "Public notes for the credit" - type: string - example: "Thank you for your business." - private_notes: - description: "Private notes for internal use, not visible to the client" - type: string - example: "Client is requesting a discount." - footer: - description: "The footer text for the credit" - type: string - example: "Footer text goes here." - custom_value1: - description: "Custom value 1 for additional credit information" - type: string - example: "Custom data 1" - custom_value2: - description: "Custom value 2 for additional credit information" - type: string - example: "Custom data 2" - custom_value3: - description: "Custom value 3 for additional credit information" - type: string - example: "Custom data 3" - custom_value4: - description: "Custom value 4 for additional credit information" - type: string - example: "Custom data 4" - tax_name1: - description: "The name of the first tax applied to the credit" - type: string - example: "VAT" - tax_name2: - description: "The name of the second tax applied to the credit" - type: string - example: "GST" - tax_rate1: - description: "The rate of the first tax applied to the credit" - type: number - format: float - example: 10.00 - tax_rate2: - description: "The rate of the second tax applied to the credit" - type: number - format: float - example: 5.00 - tax_name3: - description: "The name of the third tax applied to the credit" - type: string - example: "PST" - tax_rate3: - description: "The rate of the third tax applied to the credit" - type: number - format: float - example: 8.00 - total_taxes: - description: "The total amount of taxes for the credit" - type: number - format: float - example: 23.00 - line_items: - type: array - description: 'An array of objects which define the line items of the credit' - items: - $ref: '#/components/schemas/InvoiceItem' - amount: - description: "The total amount of the credit" - type: number - format: float - example: 100.00 - balance: - description: "The outstanding balance of the credit" - type: number - format: float - example: 50.00 - paid_to_date: - description: "The total amount paid to date for the credit" - type: number - format: float - example: 50.00 - discount: - description: "The discount applied to the credit" - type: number - format: float - example: 10.00 - partial: - description: "The partial amount applied to the credit" - type: number - format: float - example: 20.00 - is_amount_discount: - description: "Indicates whether the discount applied is a fixed amount or a percentage" - type: boolean - example: true - is_deleted: - description: "Indicates whether the credit has been deleted" - type: boolean - example: false - uses_inclusive_taxes: - description: "Indicates whether the tax rates applied to the credit are inclusive or exclusive" - type: boolean - example: true - date: - description: "The date the credit was issued" - type: string - format: date - example: "1994-07-30" - last_sent_date: - description: "The date the credit was last sent out" - type: string - format: date - example: "1994-07-30" - next_send_date: - description: "The next scheduled date for sending a credit reminder" - type: string - format: date - example: "1994-07-30" - partial_due_date: - description: "The due date for the partial amount of the credit" - type: string - format: date - example: "1994-07-30" - due_date: - description: "The due date for the total amount of the credit" - type: string - format: date - example: "1994-07-30" - settings: - $ref: "#/components/schemas/CompanySettings" - last_viewed: - description: "The timestamp of the last time the credit was viewed" - type: number - format: integer - example: 1434342123 - updated_at: - description: "The timestamp of the last time the credit was updated" - type: number - format: integer - example: 1434342123 - archived_at: - description: "The timestamp of the last time the credit was archived" - type: number - format: integer - example: 1434342123 - custom_surcharge1: - description: "First custom surcharge amount" - type: number - format: float - example: 10.00 - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - type: object + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/company_gateways: + get: + tags: + - company_gateways + summary: "Gets a list of company_gateways" + description: "Lists company_gateways, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available" + operationId: getCompanyGateways + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of company_gateways" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/CompanyGateway" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - GenericBulkAction: - properties: - action: - type: string - example: archive - description: 'The action to perform ie. archive / restore / delete' - ids: - type: array - items: - format: string - type: string - example: 2J234DFA,D2J234DFA,D2J234DFA - description: string array of client hashed ids - type: object - ProductRequest: - type: object - properties: - id: - type: string - description: 'The hashed product ID.' - example: eP01N - readOnly: true - assigned_user_id: - type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - required: false - project_id: - type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - required: false - vendor_id: - type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - required: false - custom_value1: - type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - required: false - custom_value2: - type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - required: false - custom_value3: - type: string - description: 'Custom value field 3.' - example: 'Custom value 3' - required: false - custom_value4: - type: string - description: 'Custom value field 4.' - example: 'Custom value 4' - required: false - product_key: - type: string - description: 'The product key.' - example: '1234' - required: false - notes: - type: string - description: 'Notes about the product.' - example: 'These are some notes about the product.' - required: false - cost: - type: number - format: double - description: 'The cost of the product.' - example: 10.0 - required: false - price: - type: number - format: double - description: 'The price of the product.' - example: 20.0 - required: false - quantity: - type: number - format: double - description: 'The quantity of the product.' - example: 5.0 - required: false - default: 1 - tax_name1: - type: string - description: 'The name of tax 1.' - example: 'Tax 1' - required: false - tax_rate1: - type: number - format: double - description: 'The rate of tax 1.' - example: 10.0 - required: false - tax_name2: - type: string - description: 'The name of tax 2.' - example: 'Tax 2' - required: false - tax_rate2: - type: number - format: double - description: 'The rate of tax 2.' - example: 5.0 - required: false - tax_name3: - type: string - description: 'The name of tax 3.' - example: 'Tax 3' - required: false - tax_rate3: - type: number - format: double - description: 'The rate of tax 3.' - example: 0.0 - required: false - in_stock_quantity: - type: integer - format: int32 - description: | - The quantity of the product that is currently in stock. - - **note** this field is not mutable without passing an extra query parameter which will allow modification of this value. + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - company_gateways + summary: "Adds a CompanyGateway" + description: "Adds an CompanyGateway to the system" + operationId: storeCompanyGateway + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved CompanyGateway object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/company_gateways/create: + get: + tags: + - company_gateways + summary: "Gets a new blank CompanyGateway object" + description: "Returns a blank object with default values" + operationId: getCompanyGatewaysCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank CompanyGateway object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually. + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/company_gateways/{id}": + get: + tags: + - company_gateways + summary: "Shows an CompanyGateway" + description: "Displays an CompanyGateway by id" + operationId: showCompanyGateway + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The CompanyGateway Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the CompanyGateway object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - default: 0 - required: false - stock_notification: - type: boolean - description: Indicates whether stock notifications are enabled for this product - default: true - required: false - stock_notification_threshold: - type: integer - format: int32 - description: The minimum quantity threshold for which stock notifications will be triggered - default: 0 - required: false - max_quantity: - type: integer - format: int32 - description: The maximum quantity that can be ordered for this product - required: false - product_image: - type: string - description: The URL of the product image - format: uri-reference - required: false - tax_id: - type: string - default: '1' - required: false - description: | - The tax category id for this product.' + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - company_gateways + summary: "Updates an CompanyGateway" + description: "Handles the updating of an CompanyGateway by id" + operationId: updateCompanyGateway + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The CompanyGateway Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the CompanyGateway object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - The following constants are available (default = '1') - - ``` - PRODUCT_TYPE_PHYSICAL = '1' - PRODUCT_TYPE_SERVICE = '2' - PRODUCT_TYPE_DIGITAL = '3' - PRODUCT_TYPE_SHIPPING = '4' - PRODUCT_TYPE_EXEMPT = '5' - PRODUCT_TYPE_REDUCED_TAX = '6' - PRODUCT_TYPE_OVERRIDE_TAX = '7' - PRODUCT_TYPE_ZERO_RATED = '8' - PRODUCT_TYPE_REVERSE_TAX = '9' - ``` - example: '1' + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - company_gateways + summary: "Deletes a CompanyGateway" + description: "Handles the deletion of an CompanyGateway by id" + operationId: deleteCompanyGateway + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The CompanyGateway Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" - CompanyLedger: - properties: - entity_id: - description: 'This field will reference one of the following entity hashed ID payment_id, invoice_id or credit_id' - type: string - example: AS3df3A - notes: - description: 'The notes which reference this entry of the ledger' - type: string - example: 'Credit note for invoice #3212' - balance: - description: 'The client balance' - type: number - format: float - example: '10.00' - adjustment: - description: 'The amount the client balance is adjusted by' - type: number - format: float - example: '10.00' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - type: object - Invoice: - properties: - id: - description: 'The invoice hashed id' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - readOnly: true - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - readOnly: true - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - status_id: - description: 'The invoice status variable' - type: string - example: '4' - number: - description: 'The invoice number - is a unique alpha numeric number per invoice per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this invoice' - type: string - example: PO-1234 - terms: - description: 'The invoice terms' - type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' - type: string - example: 'These are some public notes' - private_notes: - description: 'The private notes of the invoice' - type: string - example: 'These are some private notes' - footer: - description: 'The invoice footer notes' - type: string - example: '' - custom_value1: - description: 'A custom field value' - type: string - example: '2022-10-01' - custom_value2: - description: 'A custom field value' - type: string - example: 'Something custom' - custom_value3: - description: 'A custom field value' - type: string - example: '' - custom_value4: - description: 'A custom field value' - type: string - example: '' - tax_name1: - description: 'The tax name' - type: string - example: '' - tax_name2: - description: 'The tax name' - type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' - type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the invoice' - type: number - format: float - example: '10.00' - line_items: - type: array - description: 'An array of objects which define the line items of the invoice' - items: - $ref: '#/components/schemas/InvoiceItem' - invitations: - type: array - description: 'An array of objects which define the invitations of the invoice' - items: - $ref: '#/components/schemas/InvoiceInvitation' - amount: - description: 'The invoice amount' - type: number - format: float - example: '10.00' - balance: - description: 'The invoice balance' - type: number - format: float - example: '10.00' - paid_to_date: - description: 'The amount paid on the invoice to date' - type: number - format: float - example: '10.00' - discount: - description: 'The invoice discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Defines if the invoice has been deleted' - type: boolean - example: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' - type: boolean - example: true - date: - description: 'The Invoice Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the invoice was sent out' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The Next date for a reminder to be sent' - type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the deposit/partial amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the invoice' - type: string - format: date - example: '1994-07-30' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - project_id: - description: 'The project associated with this invoice' - type: string - example: Opnel5aKBz - auto_bill_tries: - description: 'The number of times the invoice has attempted to be auto billed' - type: integer - example: '1' - readOnly: true - auto_bill_enabled: - description: 'Boolean flag determining if the invoice is set to auto bill' - type: boolean - example: true - subscription_id: - description: 'The subscription associated with this invoice' - type: string - example: Opnel5aKBz - - type: object - Company: - properties: - id: - description: "The unique hashed identifier for the company" - type: string - example: WJxbojagwO - size_id: - description: "The unique identifier representing the company's size category" - type: string - example: '2' - industry_id: - description: "The unique identifier representing the company's industry category" - type: string - example: '5' - slack_webhook_url: - description: "The URL for the company's Slack webhook notifications" - type: string - example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' - google_analytics_key: - description: "The company's Google Analytics tracking ID" - type: string - example: 'UA-123456789-1' - portal_mode: - description: "The mode determining how client-facing URLs are structured (e.g., subdomain, domain, or iframe)" - type: string - example: subdomain - subdomain: - description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" - type: string - example: acme - portal_domain: - description: "The fully qualified domain used for client-facing URLs" - type: string - example: 'https://subdomain.invoicing.co' - enabled_tax_rates: - description: "The number of tax rates used per entity" - type: integer - example: '2' - fill_products: - description: "A flag determining whether to auto-fill product descriptions based on the product key" - type: boolean - example: true - convert_products: - description: "A flag determining whether to convert products between different types or units" - type: boolean - example: true - update_products: - description: "A flag determining whether to update product descriptions when the description changes" - type: boolean - example: true - show_product_details: - description: "A flag determining whether to display product details in the user interface" - type: boolean - example: true - show_product_cost: - description: "A flag determining whether to display product cost is shown in the user interface" - type: boolean - example: true - custom_fields: - description: "A mapping of custom fields for various objects within the company" - type: object - enable_product_cost: - description: "A flag determining whether to show or hide the product cost field in the user interface" - type: boolean - example: true - enable_product_quantity: - description: "A flag determining whether to show or hide the product quantity field in the user interface" - type: boolean - example: true - default_quantity: - description: "A flag determining whether to use a default quantity for products" - type: boolean - example: true - custom_surcharge_taxes1: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the first custom surcharge field" - type: boolean - example: true - custom_surcharge_taxes2: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the second custom surcharge field" - type: boolean - example: true - custom_surcharge_taxes3: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the third custom surcharge field" - type: boolean - example: true - custom_surcharge_taxes4: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the fourth custom" - logo: - description: "The company logo file in binary format" - type: string - format: binary - example: logo.png - company_key: - description: "The static company key hash used to identify the Company" - readOnly: true - type: string - example: "Vnb14bRlwiFjc5ckte6cfbygTRkn5IMQ" - client_can_register: - description: "A flag determining whether clients can register for the client portal" - type: boolean - example: true - enabled_modules: - type: integer - description: | - Bitmask representation of the modules that are enabled in the application + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/company_gateways/{id}/edit": + get: + tags: + - company_gateways + summary: "Shows an CompanyGateway for editting" + description: "Displays an CompanyGateway by id" + operationId: editCompanyGateway + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The CompanyGateway Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the CompanyGateway object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/company_gateways/bulk: + post: + tags: + - company_gateways + summary: "Performs bulk actions on an array of company_gateways" + description: "" + operationId: bulkCompanyGateways + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Array of company gateway IDs" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Company Gateways response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyGateway" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/company_ledger: + get: + tags: + - company_ledger + summary: "Gets a list of company_ledger" + description: "Lists the company_ledger." + operationId: getCompanyLedger + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of company_ledger" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/CompanyLedger" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/company_users: + post: + tags: + - company_user + summary: "Update a company user record" + description: "Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users" + operationId: updateCompanyUser + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "The Company User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyUser" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/connected_account: + post: + tags: + - connected_account + summary: "Connect an oauth user to an existing user" + description: "Refreshes the dataset" + operationId: connected_account + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/include_static" + - $ref: "#/components/parameters/clear_cache" + responses: + 200: + description: "The Company User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/designs: + get: + tags: + - designs + summary: "Gets a list of designs" + description: "Lists designs" + operationId: getDesigns + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of designs" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Design" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - designs + summary: "Adds a design" + description: "Adds an design to a company" + operationId: storeDesign + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved design object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/designs/{id}": + get: + tags: + - designs + summary: "Shows a design" + description: "Displays a design by id" + operationId: showDesign + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Design Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - designs + summary: "Updates a design" + description: "Handles the updating of a design by id" + operationId: updateDesign + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Design Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the design object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - designs + summary: "Deletes a design" + description: "Handles the deletion of a design by id" + operationId: deleteDesign + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Design Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/designs/{id}/edit": + get: + tags: + - designs + summary: "Shows a design for editting" + description: "Displays a design by id" + operationId: editDesign + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Design Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the design object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/designs/create: + get: + tags: + - designs + summary: "Gets a new blank design object" + description: "Returns a blank object with default values" + operationId: getDesignsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank design object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/designs/bulk: + post: + tags: + - designs + summary: "Performs bulk actions on an array of designs" + description: "" + operationId: bulkDesigns + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Design User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Design" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/documents: + get: + tags: + - documents + summary: "Gets a list of documents" + description: "Lists documents, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the documents, these are handled by the DocumentsFilters class which defines the methods available" + operationId: getDocuments + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of documents" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Document" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/emails: + post: + tags: + - emails + summary: "Sends an email for an entity" + description: "Sends an email for an entity" + operationId: sendEmailTemplate + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + description: "Required fields to send an email" + required: true + content: + application/json: + schema: + required: + - entity + - entity_id + - template + properties: + subject: + description: "The email subject" + type: string + body: + description: "The email body" + type: string + entity: + description: "The entity name" + type: string + entity_id: + description: "The entity_id" + type: string + cc_email: + description: "The email address of a user to be CC'd on the email" + type: string + template: + description: "The template required" + type: string + example: invoice,quote,credit,purchase_order,payment,payment_partial,reminder1,reminder2,reminder3,reminder_endless + type: object + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Template" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expense_categories: + get: + tags: + - expense_categories + summary: "Gets a list of expense_categories" + description: "Lists tax rates" + operationId: getExpenseCategorys + parameters: + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of expense_categories" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ExpenseCategory" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - expense_categories + summary: "Adds a expense category" + description: "Adds an expense category to the system" + operationId: storeExpenseCategory + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ExpenseCategory" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expense_categories/create: + get: + tags: + - expense_categories + summary: "Gets a new blank Expens Category object" + description: "Returns a blank object with default values" + operationId: getExpenseCategoryCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "A blank Expens Category object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ExpenseCategory" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/expense_categories/{id}": + get: + tags: + - expense_categories + summary: "Shows a Expens Category" + description: "Displays an ExpenseCategory by id" + operationId: showExpenseCategory + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The ExpenseCategory Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Expens Category object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ExpenseCategory" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - expense_categories + summary: "Updates a tax rate" + description: "Handles the updating of a tax rate by id" + operationId: updateExpenseCategory + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The ExpenseCategory Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the ExpenseCategory object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ExpenseCategory" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - expense_categories + summary: "Deletes a ExpenseCategory" + description: "Handles the deletion of an ExpenseCategory by id" + operationId: deleteExpenseCategory + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The ExpenseCategory Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/expense_categories/{id}/edit": + get: + tags: + - expense_categories + summary: "Shows a Expens Category for editting" + description: "Displays a Expens Category by id" + operationId: editExpenseCategory + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The ExpenseCategory Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Expens Category object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/ExpenseCategory" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expense_categories/bulk: + post: + tags: + - expense_categories + summary: "Performs bulk actions on an array of ExpenseCategorys" + description: "" + operationId: bulkExpenseCategorys + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Expens Categorys" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The ExpenseCategory List response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expenses: + get: + tags: + - expenses + summary: "Gets a list of expenses" + description: "Lists expenses, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the expenses, these are handled by the ExpenseFilters class which defines the methods available" + operationId: getExpenses + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of expenses" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Expense" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - expenses + summary: "Adds an expense" + description: "Adds a expense to a company" + operationId: storeExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/expenses/{id}": + get: + tags: + - expenses + summary: "Shows a expense" + description: "Displays a expense by id" + operationId: showExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Expense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - expenses + summary: "Updates a expense" + description: "Handles the updating of a expense by id" + operationId: updateExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Expense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - expenses + summary: "Deletes a expense" + description: "Handles the deletion of a expense by id" + operationId: deleteExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Expense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/expenses/{id}/edit": + get: + tags: + - expenses + summary: "Shows a expense for editing" + description: "Displays a client by id" + operationId: editExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Expense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expenses/create: + get: + tags: + - expenses + summary: "Gets a new blank expense object" + description: "Returns a blank object with default values" + operationId: getExpensesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/expenses/bulk: + post: + tags: + - expenses + summary: "Performs bulk actions on an array of expenses" + description: "" + operationId: bulkExpenses + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Expense User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/expenses/{id}/upload": + post: + tags: + - expense + summary: "Uploads a document to a expense" + description: "Handles the uploading of a document to a expense" + operationId: uploadExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Expense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Expense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/export: + post: + tags: + - export + summary: "Export data from the system" + description: "Export data from the system" + operationId: getExport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/group_settings: + get: + tags: + - group_settings + summary: "Gets a list of group_settings" + description: "Lists group_settings, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the group_settings, these are handled by the GroupSettingFilters class which defines the methods available" + operationId: getGroupSettings + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of group_settings" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/GroupSetting" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - group_settings + summary: "Adds a GroupSetting" + description: "Adds an GroupSetting to the system" + operationId: storeGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved GroupSetting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/GroupSetting" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/group_settings/create: + get: + tags: + - group_settings + summary: "Gets a new blank GroupSetting object" + description: "Returns a blank object with default values" + operationId: getGroupSettingsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank GroupSetting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/GroupSetting" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/group_settings/{id}": + get: + tags: + - group_settings + summary: "Shows an GroupSetting" + description: "Displays an GroupSetting by id" + operationId: showGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The GroupSetting Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the GroupSetting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/GroupSetting" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - group_settings + summary: "Updates an GroupSetting" + description: "Handles the updating of an GroupSetting by id" + operationId: updateGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The GroupSetting Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the GroupSetting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/GroupSetting" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - group_settings + summary: "Deletes a GroupSetting" + description: "Handles the deletion of an GroupSetting by id" + operationId: deleteGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The GroupSetting Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/group_settings/{id}/edit": + get: + tags: + - group_settings + summary: "Shows an GroupSetting for editting" + description: "Displays an GroupSetting by id" + operationId: editGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The GroupSetting Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the GroupSetting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/GroupSetting" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/group_settings/bulk: + post: + tags: + - group_settings + summary: "Performs bulk actions on an array of group_settings" + description: "" + operationId: bulkGroupSettings + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "An array of group_settings ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/group_settings/{id}/upload": + post: + tags: + - group_settings + summary: "Uploads a document to a group setting" + description: "Handles the uploading of a document to a group setting" + operationId: uploadGroupSetting + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Group Setting Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Group Setting object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/preimport: + post: + tags: + - imports + summary: "Pre Import checks - returns a reference to the job and the headers of the CSV" + description: "Pre Import checks - returns a reference to the job and the headers of the CSV" + operationId: preimport + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "The CSV file" + required: true + content: + multipart/form-data: + schema: + type: string + format: binary + responses: + 200: + description: "Returns a reference to the file" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/import_json: + post: + tags: + - import + summary: "Import data from the system" + description: "Import data from the system" + operationId: getImportJson + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/apple/confirm_purchase: + post: + tags: + - postmark + summary: "Processing webhooks from Apple for in app purchases" + description: "Adds an credit to the system" + operationId: confirmApplePurchase + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/apple/process_webhook: + post: + tags: + - postmark + summary: "Processing event webhooks from Apple for in purchase / subscription status update" + description: "Adds an credit to the system" + operationId: processAppleWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/claim_license: + get: + tags: + - claim_license + summary: "Attempts to claim a white label license" + description: "Attempts to claim a white label license" + operationId: getClaimLicense + parameters: + - $ref: "#/components/parameters/X-Requested-With" + - name: license_key + in: query + description: "The license hash" + required: true + schema: + type: string + format: string + example: d87sh-s755s-s7d76-sdsd8 + - name: product_id + in: query + description: "The ID of the product purchased." + required: true + schema: + type: string + format: string + example: "1" + responses: + 200: + description: Success! + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/logout: + post: + tags: + - logout + summary: "Logs the user out of their current session" + description: "Logs the user out of their current session" + operationId: getLogout + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "Success message" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/migration/purge/{company}": + post: + tags: + - migration + summary: "Attempts to purge a company record and all its child records" + description: "Attempts to purge a company record and all its child records" + operationId: postPurgeCompany + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: company + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: Success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/migration/purge_save_settings/{company}": + post: + tags: + - migration + summary: "Attempts to purge a companies child records but save the company record and its settings" + description: "Attempts to purge a companies child records but save the company record and its settings" + operationId: postPurgeCompanySaveSettings + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: company + in: path + description: "The Company Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: Success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/migration/start: + post: + tags: + - migration + summary: "Starts the migration from previous version of Invoice Ninja" + description: "Starts the migration from previous version of Invoice Ninja" + operationId: postStartMigration + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/X-API-PASSWORD" + - name: migration + in: query + description: "The migraton file" + required: true + schema: + type: object + format: file + example: migration.zip + responses: + 200: + description: Success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/one_time_token: + post: + tags: + - one_time_token + summary: "Attempts to create a one time token" + description: "Attempts to create a one time token" + operationId: oneTimeToken + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "The Company User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/payment_terms: + get: + tags: + - payment_terms + summary: "Gets a list of payment terms" + description: "Lists payment terms" + operationId: getPaymentTerms + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of payment terms" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/PaymentTerm" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - payment_terms + summary: "Adds a Payment" + description: "Adds a Payment Term to the system" + operationId: storePaymentTerm + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "The payment_terms request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + responses: + 200: + description: "Returns the saved Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/payment_terms/create: + get: + tags: + - payment_terms + summary: "Gets a new blank PaymentTerm object" + description: "Returns a blank object with default values" + operationId: getPaymentTermsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank PaymentTerm object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/payment_terms/{id}": + get: + tags: + - payment_terms + summary: "Shows a Payment Term" + description: "Displays an Payment Term by id" + operationId: showPaymentTerm + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Term Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment Term object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - payment_terms + summary: "Updates a Payment Term" + description: "Handles the updating of an Payment Termby id" + operationId: updatePaymentTerm + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Term Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment Term object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - payment_termss + summary: "Deletes a Payment Term" + description: "Handles the deletion of an PaymentTerm by id" + operationId: deletePaymentTerm + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Term Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/payment_terms/{id}/edit": + get: + tags: + - payment_terms + summary: "Shows an Payment Term for editting" + description: "Displays an Payment Term by id" + operationId: editPaymentTerms + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Term Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/payment_terms/bulk: + post: + tags: + - payment_terms + summary: "Performs bulk actions on an array of payment terms" + description: "" + operationId: bulkPaymentTerms + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Payment Ter,s" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Payment Terms response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentTerm" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/ping: + get: + tags: + - ping + summary: "Attempts to ping the API" + description: "Attempts to ping the API" + operationId: getPing + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "The company and user name" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + /api/v1/health_check: + get: + tags: + - health_check + summary: "Attempts to get a health check from the API" + description: "Attempts to get a health check from the API" + operationId: getHealthCheck + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "A key/value map of the system health" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + /api/v1/postmark_webhook: + post: + tags: + - postmark + summary: "Processing webhooks from PostMark" + description: "Adds an credit to the system" + operationId: postmarkWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/preview: + post: + tags: + - preview + summary: "Returns a pdf preview" + description: "Returns a pdf preview." + operationId: getPreview + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "The pdf response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/preview/purchase_order: + post: + tags: + - preview + summary: "Returns a pdf preview for purchase order" + description: "Returns a pdf preview for purchase order." + operationId: getPreviewPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "The pdf response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/recurring_expenses: + get: + tags: + - recurring_expenses + summary: "Gets a list of recurring_expenses" + description: "Lists recurring_expenses, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available" + operationId: getRecurringExpenses + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of recurring_expenses" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/RecurringExpense" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - recurring_expenses + summary: "Adds a recurring expense" + description: "Adds a recurring expense to a company" + operationId: storeRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved recurring expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_expenses/{id}": + get: + tags: + - recurring_expenses + summary: "Shows a recurring expense" + description: "Displays a recurring expense by id" + operationId: showRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringExpense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the recurring_expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - recurring_expenses + summary: "Updates a recurring expense" + description: "Handles the updating of a recurring expense by id" + operationId: updateRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringExpense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the recurring expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - recurring_expenses + summary: "Deletes a recurring expense" + description: "Handles the deletion of a recurring expense by id" + operationId: deleteRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringExpense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_expenses/{id}/edit": + get: + tags: + - recurring_expenses + summary: "Shows a recurring expense for editting" + description: "Displays a recurring expense by id" + operationId: editRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringExpense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the recurring expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/recurring_expenses/create: + get: + tags: + - recurring_expenses + summary: "Gets a new blank recurring expense object" + description: "Returns a blank object with default values" + operationId: getRecurringExpensesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank recurring expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/recurring_expenses/bulk: + post: + tags: + - recurring_expenses + summary: "Performs bulk actions on an array of recurring_expenses" + description: "" + operationId: bulkRecurringExpenses + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The RecurringExpense User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_expenses/{id}/upload": + post: + tags: + - recurring_expense + summary: "Uploads a document to a recurring_expense" + description: "Handles the uploading of a document to a recurring_expense" + operationId: uploadRecurringExpense + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringExpense Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the RecurringExpense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringExpense" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/recurring_quotes: + get: + tags: + - recurring_quotes + summary: "Gets a list of recurring_quotes" + description: "Lists recurring_quotes, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the recurring_quotes, these are handled by the RecurringQuoteFilters class which defines the methods available" + operationId: getRecurringQuotes + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of recurring_quotes" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/RecurringQuote" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - recurring_quotes + summary: "Adds a RecurringQuote" + description: "Adds an RecurringQuote to the system" + operationId: storeRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/recurring_quotes/create: + get: + tags: + - recurring_quotes + summary: "Gets a new blank RecurringQuote object" + description: "Returns a blank object with default values" + operationId: getRecurringQuotesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_quotes/{id}": + get: + tags: + - recurring_quotes + summary: "Shows an RecurringQuote" + description: "Displays an RecurringQuote by id" + operationId: showRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringQuote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - recurring_quotes + summary: "Updates an RecurringQuote" + description: "Handles the updating of an RecurringQuote by id" + operationId: updateRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringQuote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - recurring_quotes + summary: "Deletes a RecurringQuote" + description: "Handles the deletion of an RecurringQuote by id" + operationId: deleteRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringQuote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_quotes/{id}/edit": + get: + tags: + - recurring_quotes + summary: "Shows an RecurringQuote for editting" + description: "Displays an RecurringQuote by id" + operationId: editRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringQuote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/recurring_quotes/bulk: + post: + tags: + - recurring_quotes + summary: "Performs bulk actions on an array of recurring_quotes" + description: "" + operationId: bulkRecurringQuotes + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Hashed ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The RecurringQuote response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_quotes/{id}/{action}": + get: + tags: + - recurring_quotes + summary: "Performs a custom action on an RecurringQuote" + description: "Performs a custom action on an RecurringQuote.\n\n The current range of actions are as follows\n - clone_to_RecurringQuote\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" + operationId: actionRecurringQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringQuote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the RecurringQuote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringQuote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/contacts: + post: + tags: + - reports + summary: "Contact reports" + description: "Export contact reports" + operationId: getContactReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/clients: + post: + tags: + - reports + summary: "Client reports" + description: "Export client reports" + operationId: getClientReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/credit: + post: + tags: + - reports + summary: "Credit reports" + description: "Export credit reports" + operationId: getCreditReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/documents: + post: + tags: + - reports + summary: "Document reports" + description: "Export document reports" + operationId: getDocumentReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/expense: + post: + tags: + - reports + summary: "Expense reports" + description: "Export expense reports" + operationId: getExpenseReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/invoice_items: + post: + tags: + - reports + summary: "Invoice item reports" + description: "Export invoice item reports" + operationId: getInvoiceItemReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/invoices: + post: + tags: + - reports + summary: "Invoice reports" + description: "Export invoice reports" + operationId: getInvoiceReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/payments: + post: + tags: + - reports + summary: "Payment reports" + description: "Export payment reports" + operationId: getPaymentReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/products: + post: + tags: + - reports + summary: "Product reports" + description: "Export product reports" + operationId: getProductReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/product_sales: + post: + tags: + - reports + summary: "Product Salesreports" + description: "Export product sales reports" + operationId: getProductSalesReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/profitloss: + post: + tags: + - reports + summary: "Profit loss reports" + description: "Profit loss report" + operationId: getProfitLossReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/quote_items: + post: + tags: + - reports + summary: "Quote item reports" + description: "Export Quote item reports" + operationId: getQuoteItemReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/quotes: + post: + tags: + - reports + summary: "Quote reports" + description: "Export quote reports" + operationId: getQuoteReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/recurring_invoices: + post: + tags: + - reports + summary: "Recurring Invoice reports" + description: "Export recurring invoice reports" + operationId: getRecurringInvoiceReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/reports/tasks: + post: + tags: + - reports + summary: "Task reports" + description: "Export task reports" + operationId: getTaskReport + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericReportSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/self-update: + post: + tags: + - update + summary: "Performs a system update" + description: "Performs a system update" + operationId: selfUpdate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-API-PASSWORD" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Success/failure response" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/statics: + get: + tags: + - statics + summary: "Gets a list of statics" + description: "Lists all statics" + operationId: getStatics + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of static data" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/subscriptions: + get: + tags: + - subscriptions + summary: "Gets a list of subscriptions" + description: "Lists subscriptions." + operationId: getSubscriptions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of subscriptions" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Subscription" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - subscriptions + summary: "Adds a subscriptions" + description: "Adds an subscriptions to the system" + operationId: storeSubscription + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved subscriptions object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/subscriptions/create: + get: + tags: + - subscriptions + summary: "Gets a new blank subscriptions object" + description: "Returns a blank object with default values" + operationId: getSubscriptionsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank subscriptions object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/subscriptions/{id}": + get: + tags: + - subscriptions + summary: "Shows an subscriptions" + description: "Displays an subscriptions by id" + operationId: showSubscription + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Subscription Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Subscription object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - subscriptions + summary: "Updates an subscriptions" + description: "Handles the updating of an subscriptions by id" + operationId: updateSubscription + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Subscription Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the subscriptions object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - subscriptions + summary: "Deletes a subscriptions" + description: "Handles the deletion of an subscriptions by id" + operationId: deleteSubscription + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Subscription Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/subscriptions/{id}/edit": + get: + tags: + - subscriptions + summary: "Shows an subscriptions for editting" + description: "Displays an subscriptions by id" + operationId: editSubscription + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Subscription Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/subscriptions/bulk: + post: + tags: + - subscriptions + summary: "Performs bulk actions on an array of subscriptions" + description: "" + operationId: bulkSubscriptions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Subscription response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/support/messages/send: + post: + tags: + - support + summary: "Sends a support message to Invoice Ninja team" + description: "Allows a user to send a support message to the Invoice Ninja Team" + operationId: supportMessage + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + description: "The message" + required: true + content: + application/json: + schema: + properties: + message: + description: "The support message" + type: string + type: string + responses: + 200: + description: Success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: array + items: + description: "Server response" + type: string + example: true + default: + $ref: "#/components/responses/default" + /api/v1/system_logs: + get: + tags: + - system_logs + summary: "Gets a list of system logs" + description: "Lists system logs, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the system logs, these are handled by the SystemLogFilters class which defines the methods available" + operationId: getSystemLogs + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of system logs" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/SystemLog" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/system_logs/{id}": + get: + tags: + - system_logs + summary: "Shows a system_logs" + description: "Displays a system_logs by id" + operationId: showSystemLogs + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The system_logs Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the system_logs object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/SystemLog" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/task_schedulers/: + get: + tags: + - task_schedulers + summary: "Task Scheduler Index" + description: "Get all schedulers with associated jobs" + operationId: getTaskSchedulers + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + default: + $ref: "#/components/responses/default" + post: + tags: + - task_schedulers + summary: "Create task scheduler with job " + description: "Create task scheduler with a job (action(job) request should be sent via request also. Example: We want client report to be job which will be run\n * multiple times, we should send the same parameters in the request as we would send if we wanted to get report, see example" + operationId: createTaskScheduler + parameters: + - $ref: "#/components/parameters/X-API-SECRET" + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TaskSchedulerSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/task_schedulers/create: + get: + tags: + - task_schedulers + summary: "Gets a new blank scheduler object" + description: "Returns a blank object with default values" + operationId: getTaskScheduler + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank scheduler object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskSchedulerSchema" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/task_schedulers/{id}": + get: + tags: + - task_schedulers + summary: "Show given scheduler" + description: "Get scheduler with associated job" + operationId: showTaskScheduler + parameters: + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The Scheduler Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + default: + $ref: "#/components/responses/default" + put: + tags: + - task_schedulers + summary: "Update task scheduler " + description: "Update task scheduler" + operationId: updateTaskScheduler + parameters: + - $ref: "#/components/parameters/X-API-SECRET" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The Scheduler Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TaskSchedulerSchema" + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - task_schedulers + summary: "Destroy Task Scheduler" + description: "Destroy task scheduler and its associated job" + operationId: destroyTaskScheduler + parameters: + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The Scheduler Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: success + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + default: + $ref: "#/components/responses/default" + /api/v1/task_schedulers/bulk: + post: + tags: + - task_schedulers + summary: "Performs bulk actions on an array of task_schedulers" + description: "" + operationId: bulkTaskSchedulerActions + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "array of ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The TaskSchedule response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskSchedulerSchema" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/task_statuses: + get: + tags: + - task_status + summary: "Gets a list of task statuses" + description: "Lists task statuses" + operationId: getTaskStatuses + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of task statuses" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/TaskStatus" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - task_status + summary: "Adds a TaskStatus" + description: "Adds a TaskStatusto the system" + operationId: storeTaskStatus + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "The task_status request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + responses: + 200: + description: "Returns the saved TaskStatus object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/task_statuses/create: + get: + tags: + - task_status + summary: "Gets a new blank TaskStatus object" + description: "Returns a blank object with default values" + operationId: getTaskStatussCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank TaskStatus object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/task_statuses/{id}": + get: + tags: + - task_status + summary: "Shows a TaskStatus Term" + description: "Displays an TaskStatusby id" + operationId: showTaskStatus + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The TaskStatusHashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the TaskStatusobject" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - task_status + summary: "Updates a TaskStatus Term" + description: "Handles the updating of an TaskStatus Termby id" + operationId: updateTaskStatus + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The TaskStatusHashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the TaskStatusobject" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - task_statuss + summary: "Deletes a TaskStatus Term" + description: "Handles the deletion of an TaskStatus by id" + operationId: deleteTaskStatus + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The TaskStatusHashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/task_statuses/{id}/edit": + get: + tags: + - task_status + summary: "Shows an TaskStatusfor editting" + description: "Displays an TaskStatusby id" + operationId: editTaskStatuss + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The TaskStatusHashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the TaskStatus object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/task_statuses/bulk: + post: + tags: + - task_status + summary: "Performs bulk actions on an array of task statuses" + description: "" + operationId: bulkTaskStatuss + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "TaskStatus Ter,s" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The TaskStatus Terms response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaskStatus" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tax_rates: + get: + tags: + - tax_rates + summary: "Gets a list of tax_rates" + description: "Lists tax rates" + operationId: getTaxRates + parameters: + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of tax_rates" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/TaxRate" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tax_rates/create: + get: + tags: + - tax_rates + summary: "Gets a new blank Tax Rate object" + description: "Returns a blank object with default values" + operationId: getTaxRateCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "A blank Tax Rate object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaxRate" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/tax_rates/{id}": + get: + tags: + - tax_rates + summary: "Shows a Tax Rate" + description: "Displays an TaxRate by id" + operationId: showTaxRate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The TaxRate Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Tax Rate object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaxRate" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - tax_rates + summary: "Updates a tax rate" + description: "Handles the updating of a tax rate by id" + operationId: updateTaxRate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The TaxRate Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the TaxRate object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaxRate" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - tax_rates + summary: "Deletes a TaxRate" + description: "Handles the deletion of an TaxRate by id" + operationId: deleteTaxRate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The TaxRate Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/tax_rates/{id}/edit": + get: + tags: + - tax_rates + summary: "Shows a Tax Rate for editting" + description: "Displays a Tax Rate by id" + operationId: editTaxRate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - name: id + in: path + description: "The TaxRate Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Tax Rate object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/TaxRate" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tax_rates/bulk: + post: + tags: + - tax_rates + summary: "Performs bulk actions on an array of TaxRates" + description: "" + operationId: bulkTaxRates + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Tax Rates" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The TaxRate List response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/templates: + post: + tags: + - templates + summary: "Returns a entity template with the template variables replaced with the Entities" + description: "Returns a entity template with the template variables replaced with the Entities" + operationId: getShowTemplate + parameters: + - $ref: "#/components/parameters/X-Requested-With" + requestBody: + description: "The template subject and body" + required: true + content: + application/json: + schema: + properties: + subject: + description: "The email template subject" + type: string + body: + description: "The email template body" + type: string + type: object + responses: + 200: + description: "The template response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Template" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tokens: + get: + tags: + - tokens + summary: "Gets a list of company tokens" + description: "Lists company tokens.\n *\n * Query parameters can be added to performed more fine grained filtering of the tokens, these are handled by the TokenFilters class which defines the methods available" + operationId: getTokens + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of tokens" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/CompanyToken" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - tokens + summary: "Adds a token" + description: "Adds an token to a company" + operationId: storeToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved token object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/tokens/{id}": + get: + tags: + - tokens + summary: "Shows a token" + description: "Displays a token by id" + operationId: showToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Token Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the token object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - tokens + summary: "Updates a token" + description: "Handles the updating of a token by id" + operationId: updateToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Token Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the token object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - tokens + summary: "Deletes a token" + description: "Handles the deletion of a token by id" + operationId: deleteToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Token Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/tokens/{id}/edit": + get: + tags: + - tokens + summary: "Shows a token for editting" + description: "Displays a token by id" + operationId: editToken + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Token Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the token object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tokens/create: + get: + tags: + - tokens + summary: "Gets a new blank token object" + description: "Returns a blank object with default values" + operationId: getTokensCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank token object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/tokens/bulk: + post: + tags: + - tokens + summary: "Performs bulk actions on an array of tokens" + description: "" + operationId: bulkTokens + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Token ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Token response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/CompanyToken" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/users: + get: + tags: + - users + summary: "Gets a list of users" + description: "Lists users, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the users, these are handled by the UserFilters class which defines the methods available" + operationId: getUsers + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of users" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/User" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - users + summary: "Adds a User" + description: "Adds an User to the system" + operationId: storeUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved User object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/users/create: + get: + tags: + - users + summary: "Gets a new blank User object" + description: "Returns a blank object with default values" + operationId: getUsersCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank User object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/users/{id}": + get: + tags: + - users + summary: "Shows an User" + description: "Displays an User by id" + operationId: showUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The User Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the User object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - users + summary: "Updates an User" + description: "Handles the updating of an User by id" + operationId: updateUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The User Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the User object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - users + summary: "Deletes a User" + description: "Handles the deletion of an User by id" + operationId: deleteUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: token_name + in: query + description: "Customized name for the Users API Token" + required: false + schema: + type: string + format: string + example: "iOS Device 11 iPad" + - name: id + in: path + description: "The User Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/users/{id}/edit": + get: + tags: + - users + summary: "Shows an User for editting" + description: "Displays an User by id" + operationId: editUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The User Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the User object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/users/bulk: + post: + tags: + - users + summary: "Performs bulk actions on an array of users" + description: "" + operationId: bulkUsers + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Hashed ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/User" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/users/{user}/detach_from_company": + delete: + tags: + - users + summary: "Detach an existing user to a company" + description: "Detach an existing user from a company" + operationId: detachUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: user + in: path + description: "The user hashed_id" + required: true + schema: + type: string + format: string + example: FD767dfd7 + responses: + 200: + description: "Success response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/users/{user}/invite": + post: + tags: + - users + summary: "Reconfirm an existing user to a company" + description: "Reconfirm an existing user from a company" + operationId: inviteUser + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: user + in: path + description: "The user hashed_id" + required: true + schema: + type: string + format: string + example: FD767dfd7 + responses: + 200: + description: "Success response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/users/{user}/reconfirm": + post: + tags: + - users + summary: "Reconfirm an existing user to a company" + description: "Reconfirm an existing user from a company" + operationId: inviteUserReconfirm + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: user + in: path + description: "The user hashed_id" + required: true + schema: + type: string + format: string + example: FD767dfd7 + responses: + 200: + description: "Success response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/webcron: + get: + tags: + - webcron + summary: "Executes the task scheduler via a webcron service" + description: "Executes the task scheduler via a webcron service" + operationId: webcron + parameters: + - $ref: "#/components/parameters/X-Requested-With" + responses: + 200: + description: "Success response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/webhooks: + get: + tags: + - webhooks + summary: "Gets a list of Webhooks" + description: "Lists Webhooks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the Webhooks, these are handled by the WebhookFilters class which defines the methods available" + operationId: getWebhooks + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of Webhooks" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Webhook" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + post: + tags: + - webhooks + summary: "Adds a Webhook" + description: "Adds an Webhook to a company" + operationId: storeWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved Webhook object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/webhooks/{id}": + get: + tags: + - webhooks + summary: "Shows a Webhook" + description: "Displays a Webhook by id" + operationId: showWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Webhook Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Webhook object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + put: + tags: + - webhooks + summary: "Updates a Webhook" + description: "Handles the updating of a Webhook by id" + operationId: updateWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Webhook Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Webhook object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + delete: + tags: + - Webhooks + summary: "Deletes a Webhook" + description: "Handles the deletion of a Webhook by id" + operationId: deleteWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Webhook Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + "/api/v1/webhooks/{id}/edit": + get: + tags: + - webhooks + summary: "Shows a Webhook for editting" + description: "Displays a Webhook by id" + operationId: editWebhook + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Webhook Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Webhook object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/webhooks/create: + get: + tags: + - webhooks + summary: "Gets a new blank Webhook object" + description: "Returns a blank object with default values" + operationId: getWebhooksCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank Webhook object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + /api/v1/webhooks/bulk: + post: + tags: + - webhooks + summary: "Performs bulk actions on an array of Webhooks" + description: "" + operationId: bulkWebhooks + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Webhook User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Webhook" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + default: + $ref: "#/components/responses/default" + + /api/v1/vendors: + get: + tags: + - vendors + summary: "List vendors" + description: "Lists vendors, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available" + operationId: getVendors + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of vendors" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Vendor" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - vendors + summary: "Create vendor" + description: "Adds a vendor to a company" + operationId: storeVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved clivendorent object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}": + get: + tags: + - vendors + summary: "Show vendor" + description: "Displays a vendor by id" + operationId: showVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - vendors + summary: "Update vendor" + description: "Handles the updating of a vendor by id" + operationId: updateVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - vendors + summary: "Delete vendor" + description: "Handles the deletion of a vendor by id" + operationId: deleteVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}/edit": + get: + tags: + - vendors + summary: "Edit vendor" + description: "Displays a vendor by id" + operationId: editVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/vendors/create: + get: + tags: + - vendors + summary: "Blank vendor" + description: "Returns a blank vendor with default values" + operationId: getVendorsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/vendors/bulk: + post: + tags: + - vendors + summary: "Bulk vendor actions" + description: "" + operationId: bulkVendors + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Vendor User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}/upload": + post: + tags: + - vendors + summary: "Uploads a vendor document" + description: "Handles the uploading of a document to a vendor" + operationId: uploadVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/products: + get: + tags: + - products + summary: "List products" + description: | + Lists products, search and filters allow fine grained lists to be generated. + Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class + which defines the methods available + operationId: getProducts + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: filter + in: query + description: Filter by product name + required: false + schema: + type: string + example: bob + - name: product_key + in: query + description: Filter by product key + required: false + schema: + type: string + example: bob + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc product_key|desc + responses: + 200: + description: "A list of products" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Product" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - products + summary: "Create Product" + description: "Adds a product to a company" + operationId: storeProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: Product object that needs to be added to the company + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ProductRequest" + responses: + 200: + description: "Returns the saved product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/products/{id}": + get: + tags: + - products + summary: "Show product" + description: "Displays a product by id" + operationId: showProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - products + summary: "Update product" + description: "Handles the updating of a product by id" + operationId: updateProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: Product object that needs to be added to the company + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ProductRequest" + responses: + 200: + description: "Returns the Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - products + summary: "Delete product" + description: "Handles the deletion of a product by id" + operationId: deleteProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/products/{id}/edit": + get: + tags: + - products + summary: "Edit product" + description: "Displays an Product by id" + operationId: editProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/products/create": + get: + tags: + - products + summary: "Blank product" + description: "Returns a blank product object with default values" + operationId: getProductsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/products/bulk: + post: + tags: + - products + summary: "Bulk product actions" + description: "Archive / Restore / Delete / Set tax id in bulk" + operationId: bulkProducts + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Bulk action array" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ProductBulkAction" + responses: + 200: + description: "The Product response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/products/{id}/upload": + post: + tags: + - products + summary: "Add product document" + description: "Handles the uploading of a document to a product" + operationId: uploadProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: POST + documents: + type: array + items: + format: binary + responses: + 200: + description: "Returns the Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/recurring_invoices: + get: + tags: + - Recurring Invoices + summary: "List recurring invoices" + description: | + Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. + + operationId: getRecurringInvoices + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: filter + in: query + description: | + Searches across a range of columns including: + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=bob + - name: client_status + in: query + description: | + A comma separated list of invoice status strings. Valid options include: + - all + - active + - paused + - completed + required: false + schema: + type: string + example: ?client_status=active,paused + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc number|desc balance|asc + responses: + 200: + description: "A list of recurring_invoices" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/RecurringInvoice" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - Recurring Invoices + summary: "Create recurring invoice" + description: "Adds a Recurring Invoice to the system" + operationId: storeRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/recurring_invoices/{id}": + get: + tags: + - Recurring Invoices + summary: "Show recurring invoice" + description: "Displays an RecurringInvoice by id" + operationId: showRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - Recurring Invoices + summary: "Update recurring invoice" + description: "Handles the updating of an RecurringInvoice by id" + operationId: updateRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - Recurring Invoices + summary: "Delete recurring invoice" + description: "Handles the deletion of an RecurringInvoice by id" + operationId: deleteRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_invoices/{id}/edit": + get: + tags: + - Recurring Invoices + summary: "Edit recurring invoice" + description: "Displays an RecurringInvoice by id" + operationId: editRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/recurring_invoices/create: + get: + tags: + - Recurring Invoices + summary: "Blank recurring invoice" + description: "Returns a blank object with default values" + operationId: getRecurringInvoicesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/recurring_invoices/bulk: + post: + tags: + - Recurring Invoices + summary: "Bulk recurring invoice actions" + description: | + There are multiple actions that are available including: + + operationId: bulkRecurringInvoices + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Bulk action details" + required: true + content: + application/json: + schema: + type: object + properties: + action: + type: string + description: | + The action to be performed, options include: + - `start` + Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed. + If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from. + - `stop` + Stops the recurring invoice. + - `send_now` + Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state. + - `restore` + Restores the recurring invoice from an archived or deleted state. + - `archive` + Archives the recurring invoice. The recurring invoice will not fire in this state. + - `delete` + Deletes a recurring invoice. + ids: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" + type: string + example: + action: start + ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" + responses: + 200: + description: "The RecurringInvoice response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_invoices/{id}/{action}": + get: + deprecated: true + tags: + - Recurring Invoices + summary: "Custom recurring invoice action" + description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" + operationId: actionRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_invoice/{invitation_key}/download": + get: + tags: + - Recurring Invoices + summary: "Download recurring invoice PDF" + description: "Downloads a specific invoice" + operationId: downloadRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Recurring Invoice Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the recurring invoice pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/recurring_invoices/{id}/upload": + post: + tags: + - Recurring Invoices + summary: "Add recurring invoice document" + description: "Handles the uploading of a document to a recurring_invoice" + operationId: uploadRecurringInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The RecurringInvoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the RecurringInvoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/clients: + get: + tags: + - clients + summary: "List clients" + description: | + When retrieving a list of clients you can also chain query parameters in order to filter the dataset that is returned. For example, you can send a request to the following URL to retrieve clients that have a balance greater than 1000:\ ``` - self::ENTITY_RECURRING_INVOICE => 1, - self::ENTITY_CREDIT => 2, - self::ENTITY_QUOTE => 4, - self::ENTITY_TASK => 8, - self::ENTITY_EXPENSE => 16, - self::ENTITY_PROJECT => 32, - self::ENTITY_VENDOR => 64, - self::ENTITY_TICKET => 128, - self::ENTITY_PROPOSAL => 256, - self::ENTITY_RECURRING_EXPENSE => 512, - self::ENTITY_RECURRING_TASK => 1024, - self::ENTITY_RECURRING_QUOTE => 2048, + /api/v1/clients?balance=gt:1000 ``` - + + You can also sort the results by adding a sort parameter. The following example will sort the results by the client name in descending order:\ + + ``` + /api/v1/clients?sort=name|desc + ``` + + You can also combine multiple filters together. The following example will return clients that have a balance greater than 1000 and are not deleted and have a name that starts with "Bob":\ + + ``` + /api/v1/clients?balance=gt:1000&name=Bob* + ``` + + If you wish to retrieve child relations, you can also combine the query parameter `?include=` with a comma separated list of relationships:\ + + ``` + /api/v1/clients?include=activities,ledger,system_logs' + ``` + + The per_page and page variables allow pagination of the list of clients. The following example will return the second page of clients with 15 clients per page:\ + + ``` + /api/v1/clients?per_page=15&page=2 + ``` + The default per_page value is 20. - example: 2048 - db: - readOnly: true - type: string - example: 'db-ninja-01' - first_day_of_week: - description: "The first day of the week for the company" - type: string - example: '1' - first_month_of_year: - description: "The first month for the company financial year" - type: string - example: '1' - enabled_item_tax_rates: - description: "The number of tax rates used per item" - type: integer - example: 2 - is_large: - description: "A flag determining whether the company is considered large" - type: boolean - example: true - default_auto_bill: - type: enum - example: 'always' - description: | - A flag determining whether to auto-bill clients by default + operationId: getClients + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - $ref: "#/components/parameters/index" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: name + in: query + description: Filter by client name + required: false + schema: + type: string + example: bob + - name: balance + in: query + description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq + required: false + schema: + type: string + example: lt:10 + - name: between_balance + in: query + description: Filter between client balances, format uses two values separated by a colon + required: false + schema: + type: string + example: 10:100 + - name: email + in: query + description: Filter by client email + required: false + schema: + type: string + example: bob@gmail.com + - name: id_number + in: query + description: Filter by client id_number + required: false + schema: + type: string + example: a1039883 + - name: number + in: query + description: Filter by client number + required: false + schema: + type: string + example: a1039883 + - name: filter + in: query + description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 + required: false + schema: + type: string + example: a1039883 + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc name|desc balance|asc - values: - - - always - Always auto bill - - disabled - Never auto bill - - optin - Allow the client to select their auto bill status with the default being disabled - - optout -Allow the client to select their auto bill status with the default being enabled - mark_expenses_invoiceable: - description: "A flag determining whether to mark expenses as invoiceable by default" - type: boolean - example: true - mark_expenses_paid: - description: "A flag determining whether to mark expenses as paid by default" - type: boolean - example: true - invoice_expense_documents: - description: "A flag determining whether to include expense documents on invoices by default" - type: boolean - example: true - auto_start_tasks: - description: "A flag determining whether to auto-start tasks by default" - type: boolean - example: true - invoice_task_timelog: - description: "A flag determining whether to include task time logs on invoices by default" - type: boolean - example: true - invoice_task_documents: - description: "A flag determining whether to include task documents on invoices by default" - type: boolean - example: true - show_tasks_table: - description: "A flag determining whether to show the tasks table on invoices by default" - type: boolean - example: true - is_disabled: - description: "A flag determining whether the company is disabled" - type: boolean - example: true - default_task_is_date_based: - description: "A flag determining whether to default tasks to be date-based" - type: boolean - example: true - enable_product_discount: - description: "A flag determining whether to show or hide the product discount field in the user interface" - type: boolean - example: true - calculate_expense_tax_by_amount: - description: "A flag determining whether to calculate expense taxes by amount" - type: boolean - example: true - expense_inclusive_taxes: - description: "A flag determining whether to include taxes in the expense amount" - type: boolean - example: true - session_timeout: - description: "The session timeout for the company" - type: integer - example: 60 - oauth_password_required: - description: "A flag determining whether to require a password for `dangerous` actions when using OAuth" - type: boolean - example: true - invoice_task_datelog: - description: "A flag determining whether to include task date logs on invoices by default" - type: boolean - example: true - default_password_timeout: - description: "The default password timeout for the company" - type: integer - example: 60 - show_task_end_date: - description: "A flag determining whether to show the task end date on invoices by default" - type: boolean - example: true - markdown_enabled: - description: "A flag determining whether markdown is enabled for the company" - type: boolean - example: true - report_include_drafts: - description: "A flag determining whether to include draft invoices in reports" - type: boolean - example: true - client_registration_fields: - description: "The client registration fields for the company" - type: object - stop_on_unpaid_recurring: - description: "A flag determining whether to stop recurring invoices when they are unpaid" - type: boolean - example: true - use_quote_terms_on_conversion: - description: "A flag determining whether to use quote terms on conversion to an invoice" - type: boolean - example: true - enable_applying_payments: - description: "A flag determining whether to enable applying payments to invoices" - type: boolean - example: true - track_inventory: - description: "A flag determining whether to track inventory for the company" - type: boolean - example: true - inventory_notification_threshold: - description: "The inventory notification threshold for the company" - type: integer - example: 60 - stock_notification: - description: "A flag determining whether to send stock notifications for the company" - type: boolean - example: true - matomo_url: - description: "The Matomo URL for the company" - type: string - example: 'https://matomo.example.com' - matomo_id: - description: "The Matomo ID for the company" - type: string - example: '1' - enabled_expense_tax_rates: - description: "The number of tax rates used per expense" - type: integer - example: 2 - invoice_task_project: - description: "A flag determining whether to include the project on invoices by default" - type: boolean - example: true - report_include_deleted: - description: "A flag determining whether to include deleted invoices in reports" - type: boolean - example: true - invoice_task_lock: - description: "A flag determining whether to lock tasks when invoiced" - type: boolean - example: true - convert_payment_currency: - description: "A flag determining whether to convert the payment currency" - type: boolean - example: true - convert_expense_currency: - description: "A flag determining whether to convert the expense currency" - type: boolean - example: true - notify_vendor_when_paid: - description: "A flag determining whether to notify the vendor when an expense is paid" - type: boolean - example: true - invoice_task_hours: - description: "A flag determining whether to include the task hours on invoices by default" - type: boolean - example: true - calculate_taxes: - description: "A flag determining whether to calculate taxes for the company" - type: boolean - example: true - tax_data: - description: "The tax data for the company" - type: object - e_invoice_certificate: - description: "The e-invoice certificate for the company" - type: string - example: '-----BEGIN CERTIFICATE-----' - e_invoice_certificate_passphrase: - description: "The e-invoice certificate passphrase for the company" - type: string - example: 'secret' - origin_tax_data: - description: "The origin tax data for the company" - type: object - invoice_task_project_header: - description: "A flag determining whether to include the project header on invoices by default" - type: boolean - example: true - invoice_task_item_description: - description: "A flag determining whether to include the item description on invoices by default" - type: boolean - example: true - - settings: - $ref: '#/components/schemas/CompanySettings' - type: object - InvoiceRequest: - required: - - client_id - properties: - id: - description: 'The invoice hashed id' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - readOnly: true - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - status_id: - description: 'The invoice status variable' - type: string - example: '4' - readOnly: true - number: - description: 'The invoice number - is a unique alpha numeric number per invoice per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this invoice' - type: string - example: PO-1234 - terms: - description: 'The invoice terms' - type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' - type: string - example: 'These are some public notes' - private_notes: - description: 'The private notes of the invoice' - type: string - example: 'These are some private notes' - footer: - description: 'The invoice footer notes' - type: string - example: '' - custom_value1: - description: 'A custom field value' - type: string - example: '2022-10-01' - custom_value2: - description: 'A custom field value' - type: string - example: 'Something custom' - custom_value3: - description: 'A custom field value' - type: string - example: '' - custom_value4: - description: 'A custom field value' - type: string - example: '' - tax_name1: - description: 'The tax name' - type: string - example: '' - tax_name2: - description: 'The tax name' - type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' - type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the invoice' - type: number - format: float - example: '10.00' - readOnly: - line_items: - type: array - description: 'An array of objects which define the line items of the invoice' - items: - $ref: '#/components/schemas/InvoiceItem' - invitations: - type: array - description: 'An array of objects which define the invitations of the invoice' - items: - $ref: '#/components/schemas/InvoiceInvitationRequest' - amount: - description: 'The invoice amount' - type: number - format: float - example: '10.00' - readOnly: true - balance: - description: 'The invoice balance' - type: number - format: float - example: '10.00' - readOnly: true - paid_to_date: - description: 'The amount paid on the invoice to date' - type: number - format: float - example: '10.00' - readOnly: true - discount: - description: 'The invoice discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Defines if the invoice has been deleted' - type: boolean - example: true - readOnly: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' - type: boolean - example: true - date: - description: 'The Invoice Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the invoice was sent out' - type: string - format: date - example: '1994-07-30' - readOnly: true - next_send_date: - description: 'The Next date for a reminder to be sent' - type: string - format: date - example: '1994-07-30' - readOnly: true - partial_due_date: - description: 'The due date for the deposit/partial amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the invoice' - type: string - format: date - example: '1994-07-30' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - project_id: - description: 'The project associated with this invoice' - type: string - example: Opnel5aKBz - type: object - SystemLog: - properties: - id: - description: 'The account hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user_id hashed id' - type: string - example: AS3df3A - client_id: - description: 'The client_id hashed id' - type: string - example: AS3df3A - event_id: - description: 'The Log Type ID' - type: integer - example: 1 - category_id: - description: 'The Category Type ID' - type: integer - example: 1 - type_id: - description: 'The Type Type ID' - type: integer - example: 1 - log: - description: 'The json object of the error' - type: object - example: '{''key'':''value''}' - updated_at: - description: Timestamp - type: string - example: '2' - created_at: - description: Timestamp - type: string - example: '2' - type: object - Expense: - properties: - id: - description: 'The expense hashed id' - type: string - example: 'Opnel5aKBz' - user_id: - description: 'The user hashed id' - type: string - example: 'Opnel5aKBz' - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: 'Opnel5aKBz' - project_id: - description: 'The associated project_id' - type: string - example: 'Opnel5aKBz' - company_id: - description: 'The company hashed id' - type: string - example: 'Opnel5aKBz' - client_id: - description: 'The client hashed id' - type: string - example: 'Opnel5aKBz' - invoice_id: - description: 'The related invoice hashed id' - type: string - example: 'Opnel5aKBz' - bank_id: - description: 'The bank id related to this expense' - type: string - example: '' - invoice_currency_id: - description: 'The currency id of the related invoice' - type: string - example: '1' - expense_currency_id: - description: 'The currency id of the expense' - type: string - example: '2' - invoice_category_id: - description: 'The invoice category id' - type: string - example: 'Opnel5aKBz' - payment_type_id: - description: 'The payment type id' - type: string - example: '' - recurring_expense_id: - description: 'The related recurring expense this expense was created from' - type: string - example: 'Opnel5aKBz' - private_notes: - description: 'The private notes of the expense' - type: string - example: '' - public_notes: - description: 'The public notes of the expense' - type: string - example: '' - transaction_reference: - description: 'The transaction references of the expense' - type: string - example: '' - transcation_id: - description: 'The transaction id of the expense' - type: string - example: '' - custom_value1: - description: 'A custom value' - type: string - example: '' - custom_value2: - description: 'A custom value' - type: string - example: '' - custom_value3: - description: 'A custom value' - type: string - example: '' - custom_value4: - description: 'A custom value' - type: string - example: '' - tax_amount: - description: 'The tax amount' - type: number - example: 10.00 - tax_name1: - description: 'Tax Name 1' - type: string - example: 'GST' - tax_name2: - description: 'Tax Name 2' - type: string - example: 'VAT' - tax_name3: - description: 'Tax Name 3' - type: string - example: 'IVA' - tax_rate1: - description: 'Tax rate 1' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'Tax rate 2' - type: number - format: float - example: '10.00' - tax_rate3: - description: 'Tax rate 3' - type: number - format: float - example: '10.00' - amount: - description: 'The total expense amont' - type: number - format: float - example: '10.00' - foreign_amount: - description: 'The total foreign amount of the expense' - type: number - format: float - example: '10.00' - exchange_rate: - description: 'The exchange rate at the time of the expense' - type: number - format: float - example: '0.80' - date: - description: 'The expense date format Y-m-d' - type: string - example: '2022-12-01' - payment_date: - description: 'The date of payment for the expense, format Y-m-d' - type: string - example: '2022-12-01' - should_be_invoiced: - description: 'Flag whether the expense should be invoiced' - type: boolean - example: true - is_deleted: - description: 'Boolean determining whether the expense has been deleted' - type: boolean - example: true - invoice_documents: - description: 'Passing the expense documents over to the invoice' - type: boolean - example: true - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - type: object - BankTransaction: - properties: - id: - description: 'The bank integration hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: AS3df3A - transaction_id: - description: 'The id of the transaction rule' - type: integer - example: 343434 - amount: - description: 'The transaction amount' - type: number - example: 10 - currency_id: - description: 'The currency ID of the currency' - type: string - example: '1' - account_type: - description: 'The account type' - type: string - example: creditCard - description: - description: 'The description of the transaction' - type: string - example: 'Potato purchases for kevin' - category_id: - description: 'The category id' - type: integer - example: 1 - category_type: - description: 'The category description' - type: string - example: Expenses - base_type: - description: 'Either CREDIT or DEBIT' - type: string - example: CREDIT - date: - description: 'The date of the transaction' - type: string - example: '2022-09-01' - bank_account_id: - description: 'The ID number of the bank account' - type: integer - example: '1' - type: object - ExpenseCategory: - properties: - id: - description: 'The expense hashed id' - type: string - example: Opnel5aKBz - name: - description: 'The expense category name' - type: string - example: Accounting - user_id: - description: 'The user hashed id' - type: string - example: XS987sD - is_deleted: - description: 'Flag determining whether the expense category has been deleted' - type: boolean - example: true - updated_at: - description: 'The updated at timestamp' - type: integer - example: '2' - created_at: - description: 'The created at timestamp' - type: integer - example: '2' - type: object - BankIntegration: - properties: - id: - description: 'The bank integration hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: AS3df3A - provider_bank_name: - description: 'The providers bank name' - type: string - example: 'Chase Bank' - bank_account_id: - description: 'The bank account id' - type: integer - example: '1233434' - bank_account_name: - description: 'The name of the account' - type: string - example: 'My Checking Acc' - bank_account_number: - description: 'The account number' - type: string - example: '111 234 2332' - bank_account_status: - description: 'The status of the bank account' - type: string - example: ACTIVE - bank_account_type: - description: 'The type of account' - type: string - example: CREDITCARD - balance: - description: 'The current bank balance if available' - type: number - example: '1000000' - currency: - description: 'iso_3166_3 code' - type: string - example: USD - type: object - Subscription: - properties: - id: - description: Unique identifier for the subscription - type: string - example: Opnel5aKBz - user_id: - description: Unique identifier for the user associated with the subscription - type: string - example: Ua6Rw4pVbS - product_id: - description: Unique identifier for the product associated with the subscription - type: string - example: Pr5Ft7yBmC - company_id: - description: Unique identifier for the company associated with the subscription - type: string - example: Co7Vn3yLmW - recurring_invoice_id: - description: Unique identifier for the recurring invoice associated with the subscription - type: string - example: Ri2Yt8zJkP - is_recurring: - description: Indicates whether the subscription is recurring - type: boolean - example: 'true' - frequency_id: - description: 'integer const representation of the frequency' - type: string - example: '1' - auto_bill: - description: 'enum setting' - type: string - example: always - promo_code: - description: Promotional code applied to the subscription - type: string - example: PROMOCODE4U - promo_discount: - description: Discount percentage or amount applied to the subscription - type: number - example: 10 - is_amount_discount: - description: Indicates whether the discount is a fixed amount - type: boolean - example: 'true' - allow_cancellation: - description: Indicates whether the subscription can be cancelled - type: boolean - example: 'true' - per_seat_enabled: - description: Indicates whether the subscription pricing is per seat - type: boolean - example: 'true' - currency_id: - description: Unique identifier for the currency used in the subscription - type: integer - example: '1' - max_seats_limit: - description: Maximum number of seats allowed for the subscription - type: integer - example: '100' - trial_enabled: - description: Indicates whether the subscription has a trial period - type: boolean - example: 'true' - trial_duration: - description: Duration of the trial period in days - type: integer - example: '14' - allow_query_overrides: - description: Indicates whether query overrides are allowed for the subscription - type: boolean - example: 'true' - allow_plan_changes: - description: Indicates whether plan changes are allowed for the subscription - type: boolean - example: 'true' - refund_period: - description: Number of days within which refunds can be requested - type: integer - example: '30' - webhook_configuration: - description: Webhook configuration for the subscription - type: string - example: 'expand reference for this' - is_deleted: - description: Indicates whether the subscription has been deleted - type: boolean - example: 'false' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - BulkAction: - type: array - items: - type: integer - example: '[0,1,2,3,]' - FillableInvoice: - properties: - assigned_user_id: - description: "The assigned user's hashed ID" - type: string - example: 'a1b2c3d4' - client_id: - description: "The client's hashed ID" - type: string - example: 'x1y2z3a4' - number: - description: "The unique alphanumeric invoice number for each invoice per company" - type: string - example: INV_101 - po_number: - description: "The purchase order number associated with the invoice" - type: string - example: 'PO12345' - terms: - description: "The terms and conditions for the invoice" - type: string - example: 'Net 30' - public_notes: - description: "Public notes visible to the client on the invoice" - type: string - example: 'Thank you for your business.' - private_notes: - description: "Private notes for internal use only" - type: string - example: 'Client is a slow payer.' - footer: - description: "The footer text displayed on the invoice" - type: string - example: 'Authorized Signature' - custom_value1: - description: "First custom value for additional information" - type: string - example: 'Project ABC' - custom_value2: - description: "Second custom value for additional information" - type: string - example: 'Department XYZ' - custom_value3: - description: "Third custom value for additional information" - type: string - example: 'Location 123' - custom_value4: - description: "Fourth custom value for additional information" - type: string - example: 'Currency USD' - tax_name1: - description: "Name of the first tax applied to the invoice" - type: string - example: 'VAT' - tax_name2: - description: "Name of the second tax applied to the invoice" - type: string - example: 'GST' - tax_rate1: - description: "Rate of the first tax applied to the invoice" - type: number - example: 10.00 - tax_rate2: - description: "Rate of the second tax applied to the invoice" - type: number - example: 5.00 - tax_name3: - description: "Name of the third tax applied to the invoice" - type: string - example: 'PST' - tax_rate3: - description: "Rate of the third tax applied to the invoice" - type: number - example: 8.00 - line_items: - type: array - description: 'An array of objects which define the line items of the invoice' - items: - $ref: '#/components/schemas/InvoiceItem' - discount: - description: "The discount applied to the invoice" - type: number - example: 10.00 - partial: - description: "The partial amount applied to the invoice" - type: number - example: 20.00 - is_amount_discount: - description: "Indicates whether the discount applied is a fixed amount or a percentage" - type: boolean - example: true - uses_inclusive_taxes: - description: "Indicates whether the tax rates applied to the invoice are inclusive or exclusive" - type: boolean - example: true - date: - description: "The date the invoice was issued" - type: string - example: '1994-07-30' - partial_due_date: - description: "The due date for the partial payment" - type: string - example: '1994-08-15' - due_date: - description: "The due date for the invoice" - type: string - example: '1994-08-30' - custom_surcharge1: - description: "First custom surcharge applied to the invoice" - type: number - example: 10.00 - custom_surcharge2: - description: "Second custom surcharge applied to the invoice" - type: number - example: 15.00 - custom_surcharge3: - description: "Third custom surcharge applied to the invoice" - type: number - example: 5.00 - custom_surcharge4: - description: "Fourth custom surcharge applied to the invoice" - type: number - example: 20.00 - type: object - RecurringQuote: - properties: - id: - description: 'The hashed id of the recurring quote' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - status_id: - description: 'The quote status variable' - type: string - example: '4' - frequency_id: - description: 'The recurring quote frequency' - type: number - example: '4' - remaining_cycles: - description: 'The number of quotes left to be generated' - type: number - example: '4' - number: - description: 'The recurringquote number - is a unique alpha numeric number per quote per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this recurring quote' - type: string - example: PO-1234 - terms: - description: 'The quote terms' - type: string - example: 'These are quote terms' - public_notes: - description: 'The public notes of the quote' - type: string - example: 'These are some public notes' - private_notes: - description: 'The private notes of the quote' - type: string - example: 'These are some private notes' - footer: - description: 'The quote footer notes' - type: string - example: '' - custom_value1: - description: 'A custom field value' - type: string - example: '2022-10-01' - custom_value2: - description: 'A custom field value' - type: string - example: 'Something custom' - custom_value3: - description: 'A custom field value' - type: string - example: '' - custom_value4: - description: 'A custom field value' - type: string - example: '' - tax_name1: - description: 'The tax name' - type: string - example: '' - tax_name2: - description: 'The tax name' - type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' - type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the quote' - type: number - format: float - example: '10.00' - line_items: - description: 'An array of objects which define the line items of the quote' - type: object - example: '' - amount: - description: 'The quote amount' - type: number - format: float - example: '10.00' - balance: - description: 'The quote balance' - type: number - format: float - example: '10.00' - paid_to_date: - description: 'The amount paid on the quote to date' - type: number - format: float - example: '10.00' - discount: - description: 'The quote discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Defines if the quote has been deleted' - type: boolean - example: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' - type: boolean - example: true - date: - description: 'The quote Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the quote was sent out' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The Next date for a reminder to be sent' - type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the deposit/partial amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the quote' - type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - type: object - Paymentable: - properties: - id: - description: 'The paymentable hashed id' - type: string - example: AS3df3A - invoice_id: - description: 'The invoice hashed id' - type: string - example: AS3df3A - credit_id: - description: 'The credit hashed id' - type: string - example: AS3df3A - refunded: - description: 'The amount that has been refunded for this payment' - type: number - format: float - example: '10.00' - amount: - description: 'The amount that has been applied to the payment' - type: number - format: float - example: '10.00' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - type: object - Meta: - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Pagination: - type: object - properties: - total: - type: integer - description: 'The total number of items' - example: 1 - readOnly: true - count: - type: integer - description: 'The number of items per page' - example: 1 - readOnly: true - per_page: - type: integer - description: 'The number of items per page' - example: 1 - readOnly: true - current_page: - type: integer - description: 'The current page number' - example: 1 - readOnly: true - total_pages: - type: integer - description: 'The total number of pages' - example: 1 - readOnly: true - links: - type: array - description: 'The pagination links' - readOnly: true - Project: - type: object - properties: - id: - description: 'The project hashed id' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - assigned_user_id: - description: The assigned user identifier associated with the project - type: string - example: Opnel5aKBz - client_id: - type: string - example: Opnel5aKBz - description: The client identifier associated with the project - name: - type: string - description: The name of the project - example: 'New Project' - task_rate: - type: number - format: float - example: 10 - description: The default rate per task for the project - due_date: - type: string - format: date - example: '2019-01-01' - description: The due date for the project - private_notes: - type: string - description: Private notes associated with the project - budgeted_hours: - type: number - format: float - description: The number of budgeted hours for the project - custom_value1: - type: string - description: Custom value field 1 - custom_value2: - type: string - description: Custom value field 2 - custom_value3: - type: string - description: Custom value field 3 - custom_value4: - type: string - description: Custom value field 4 - created_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the project creation - updated_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the last project update - archived_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the project deletion - public_notes: - type: string - description: Public notes associated with the project - is_deleted: - type: boolean - description: A flag indicating if the project is deleted - number: - type: string - description: The project number - color: - type: string - description: The color associated with the project - required: - - id - - user_id - - company_id - - name - - task_rate - - budgeted_hours - - is_deleted - - color + responses: + 200: + description: "A list of clients" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Client" + example: + $ref: "#/components/examples/Client" + meta: + type: object + $ref: "#/components/schemas/Meta" + example: + $ref: "#/components/examples/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + post: + tags: + - clients + summary: "Create client" + description: | + Adds a client to a company - Client: - properties: - id: - description: 'The unique identifier of the client' - type: string - example: Opnel5aKBz - readOnly: true - contacts: - type: array - items: - $ref: '#/components/schemas/ClientContact' - user_id: - description: 'The unique identifier of the user who created the client' - type: string - example: Ua6Rw4pVbS - readOnly: true - assigned_user_id: - description: 'The unique identifier of the user who has been assigned the client' - type: string - example: Ua6Rw4pVbS - company_id: - description: 'The unique identifier of the company the client belongs to' - type: string - example: Co7Vn3yLmW - readOnly: true - name: - description: 'The name of the client company or organization' - type: string - example: "Jim's Housekeeping" - website: - description: 'The website URL of the client company or organization' - type: string - example: 'https://www.jims-housekeeping.com' - private_notes: - description: 'Notes that are only visible to the user who created the client' - type: string - example: 'Client prefers email communication over phone calls' - client_hash: - description: 'A unique hash value for the client' - type: string - example: asdfkjhk342hjhbfdvmnfb1 - readOnly: true - industry_id: - description: 'The unique identifier of the industry the client operates in' - type: number - example: '5' - size_id: - description: 'The unique identifier for the size category of the client company or organization' - type: number - example: '2' - address1: - description: "First line of the client's address" - type: string - example: '123 Main St' - address2: - description: "Second line of the client's address, if needed" - type: string - example: 'Apt 4B' - city: - description: 'The city the client is located in' - type: string - example: 'Beverly Hills' - state: - description: 'The state, province, or locality the client is located in' - type: string - example: 'California' - postal_code: - description: 'The postal code or ZIP code of the client' - type: string - example: '90210' - phone: - description: "The client's phone number" - type: string - example: '555-3434-3434' - country_id: - description: "The unique identifier of the client's country" - type: number - format: integer - example: '1' - custom_value1: - description: 'A custom field for storing additional information' - type: string - example: 'Preferred contact: Email' - custom_value2: - description: 'A custom field for storing additional information' - type: string - example: 'Account manager: John Doe' - custom_value3: - description: 'A custom field for storing additional information' - type: string - example: 'VIP client: Yes' - custom_value4: - description: 'A custom field for storing additional information' - type: string - example: 'Annual contract value: $50,000' - vat_number: - description: "The client's VAT (Value Added Tax) number, if applicable" - type: string - example: 'VAT123456' - id_number: - description: 'A unique identification number for the client, such as a tax ID or business registration number' - type: string - number: - description: 'A system-assigned unique number for the client, typically used for invoicing purposes' - type: string - example: 'CL-0001' - shipping_address1: - description: "First line of the client's shipping address" - type: string - example: '5 Wallaby Way' - shipping_address2: - description: "Second line of the client's shipping address, if needed" - type: string - example: 'Suite 5' - shipping_city: - description: "The city of the client's shipping address" - type: string - example: 'Perth' - shipping_state: - description: "The state, province, or locality of the client's shipping address" - type: string - example: 'Western Australia' - shipping_postal_code: - description: "The postal code or ZIP code of the client's shipping address" - type: string - example: '6110' - shipping_country_id: - description: "The unique identifier of the country for the client's shipping address" - type: number - format: integer - example: '4' - is_deleted: - description: 'A boolean value indicating whether the client has been deleted or not' - type: boolean - example: false - readOnly: true - balance: - description: 'The outstanding balance the client owes' - type: number - format: float - example: '500.00' - readOnly: true - paid_to_date: - description: 'The total amount the client has paid to date' - type: number - format: float - example: '2000.00' - readOnly: true - credit_balance: - description: 'The available credit balance for the client to use on future purchases' - type: number - format: float - example: '100.00' - readOnly: true - last_login: - description: "The timestamp of the client's last login" - type: number - format: integer - example: '1628686031' - readOnly: true + When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation. + + operationId: storeClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + requestBody: + description: Client object that needs to be added to the company + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ClientRequest" + responses: + 200: + description: "Returns the saved client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + "/api/v1/clients/{id}": + get: + tags: + - clients + summary: "Show client" + description: "Displays a client by id" + operationId: showClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + put: + tags: + - clients + summary: "Update client" + description: "Handles the updating of a client by id" + operationId: updateClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: Client object that needs to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ClientRequest" + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + delete: + tags: + - clients + summary: "Delete client" + description: "Handles the deletion of a client by id" + operationId: deleteClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + "/api/v1/clients/{id}/edit": + get: + tags: + - clients + summary: "Edit Client" + description: "Displays a client by id, essentially an alias of the show route" + operationId: editClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + /api/v1/clients/create: + get: + tags: + - clients + summary: "Blank Client" + description: "Returns a blank object with default values" + operationId: getClientsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + responses: + 200: + description: "A blank client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + /api/v1/clients/bulk: + post: + tags: + - clients + summary: "Bulk client actions" + description: "Archive / Restore / Delete in bulk" + operationId: bulkClients + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Bulk action array" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/GenericBulkAction" + + responses: + 200: + description: "The Client listresponse" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + "/api/v1/clients/{id}/upload": + post: + tags: + - clients + summary: "Add client document" + description: "Handles the uploading of a document to a client, please note due to a quirk in REST you will need to use a _method parameter with value of POST" + operationId: uploadClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: POST + documents: + type: array + items: + format: binary + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + "/api/v1/clients/{id}/purge": + post: + tags: + - clients + summary: "Purge client" + description: | + Handles purging a clients. + + Please note this is a destructive action. + + This action will remove all data associated with the client and cannot be undone. + operationId: purgeClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/X-API-PASSWORD" + - $ref: "#/components/parameters/client_include" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + "/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge": + post: + tags: + - clients + summary: "Merge client" + description: | + Handles merging 2 clients + + The id parameter is the client that will be the primary client after the merge has completed. + + The mergeable_client_hashed_id is the client that will be merged into the primary client, this clients records will be updated and associated with the primary client. + operationId: mergeClient + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/client_include" + - $ref: "#/components/parameters/X-API-PASSWORD" + - name: id + in: path + description: "The Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: mergeable_client_hashed_id + in: path + description: "The Mergeable Client Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + default: + $ref: "#/components/responses/default" + /api/v1/client_statement: + post: + tags: + - clients + summary: "Client statement PDF" + description: "Return a PDF of the client statement" + operationId: clientStatement + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "Statement Options" + required: true + content: + application/json: + schema: + properties: + start_date: + description: "The start date of the statement period - format Y-m-d" + type: string + end_date: + description: "The start date of the statement period - format Y-m-d" + type: string + client_id: + description: "The hashed ID of the client" + type: string + show_payments_table: + description: "Flag which determines if the payments table is shown" + type: boolean + show_credits_table: + description: "Flag which determines if the credits table is shown" + type: boolean + show_aging_table: + description: "Flag which determines if the aging table is shown" + type: boolean + type: object + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Client" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/reactivate_email/{bounce_id}: + post: + tags: + - clients + summary: "Removes email suppression of a user in the system" + description: "Emails are suppressed by PostMark, when they receive a Hard bounce / Spam Complaint. This endpoint allows you to remove the suppression and send emails to the user again." + operationId: reactivateEmail + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: bounce_id + in: path + description: "The postmark Bounce ID reference" + required: true + schema: + type: string + format: string + example: 123243 + responses: + 200: + description: "Success" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 400: + description: "Postmark exception - generated if the suppression cannot be removed for any reason" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/clients/{client}/updateTaxData: + post: + tags: + - clients + summary: "Update tax data" + description: "Updates the clients tax data - if their address has changed" + operationId: updateClientTaxData + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: client + in: path + description: "The Client Hashed ID reference" + required: true + schema: + type: string + format: string + example: V2J234DFA + responses: + 200: + description: "Success" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 400: + description: "Postmark exception - generated if the suppression cannot be removed for any reason" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/credits: + get: + tags: + - credits + summary: "List credits" + description: "Lists credits, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the credits, these are handled by the CreditFilters class which defines the methods available" + operationId: getCredits + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of credits" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Credit" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - credits + summary: "Create credit" + description: "Adds an credit to the system" + operationId: storeCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/credits/{id}": + get: + tags: + - credits + summary: "Show credit" + description: "Displays an credit by id" + operationId: showCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Credit Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - Credits + summary: "Update credit" + description: "Handles the updating of an Credit by id" + operationId: updateCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Credit Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - credits + summary: "Delete credit" + description: "Handles the deletion of an credit by id" + operationId: deleteCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Credit Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/credits/{id}/edit": + get: + tags: + - credits + summary: "Edit credit" + description: "Displays an credit by id" + operationId: editCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/credits/create: + get: + tags: + - credits + summary: "Blank credit" + description: "Returns a blank object with default values" + operationId: getCreditsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/credits/bulk: + post: + tags: + - credits + summary: "Bulk credit actions" + description: "" + operationId: bulkCredits + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: string + example: "[D2J234DFA,D2J234DFA,D2J234DFA]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/credit/{invitation_key}/download": + get: + tags: + - quotes + summary: "Download quote PDF" + description: "Downloads a specific quote" + operationId: downloadCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Credit Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the credit pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/credits/{id}/upload": + post: + tags: + - credits + summary: "Upload a credit document" + description: "Handles the uploading of a document to a credit" + operationId: uploadCredits + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Credit Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Credit object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/projects: + get: + tags: + - projects + summary: "List projects" + description: "Lists projects" + operationId: getProjects + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of projects" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Project" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - projects + summary: "Create project" + description: "Adds an project to a company" + operationId: storeProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved project object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/projects/{id}": + get: + tags: + - projects + summary: "Show project" + description: "Displays a project by id" + operationId: showProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Project Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the expense object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - projects + summary: "Update project" + description: "Handles the updating of a project by id" + operationId: updateProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Project Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the project object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - projects + summary: "Delete project" + description: "Handles the deletion of a project by id" + operationId: deleteProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Project Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/projects/{id}/edit": + get: + tags: + - projects + summary: "Edit project" + description: "Displays a project by id" + operationId: editProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Project Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the project object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/projects/create: + get: + tags: + - projects + summary: "Blank project" + description: "Returns a blank object with default values" + operationId: getProjectsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank project object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/projects/bulk: + post: + tags: + - projects + summary: "Bulk project actions" + description: "" + operationId: bulkProjects + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Project User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/projects/{id}/upload": + post: + tags: + - projects + summary: "Uploads a project document" + description: "Handles the uploading of a document to a project" + operationId: uploadProject + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Project Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Project object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/quotes: + get: + tags: + - quotes + summary: "List quotes" + description: "Lists quotes, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the quotes, these are handled by the QuoteFilters class which defines the methods available" + operationId: getQuotes + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: filter + in: query + description: | + Searches across a range of columns including: + - number + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=bob + - name: client_status + in: query + description: | + A comma separated list of quote status strings. Valid options include: + - all + - draft + - sent + - approved + - expired + - upcoming + required: false + schema: + type: string + example: ?client_status=paid,unpaid + - name: number + in: query + description: | + Search quote by quote number + required: false + schema: + type: string + example: ?number=Q-001 + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc number|desc balance|asc + responses: + 200: + description: "A list of quotes" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Quote" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - quotes + summary: "Create quote" + description: "Adds an Quote to the system" + operationId: storeQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}": + get: + tags: + - quotes + summary: "Show quote" + description: "Displays an Quote by id" + operationId: showQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - quotes + summary: "Update quote" + description: "Handles the updating of an Quote by id" + operationId: updateQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - quotes + summary: "Delete quote" + description: "Handles the deletion of an Quote by id" + operationId: deleteQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/edit": + get: + tags: + - quotes + summary: "Edit quote" + description: "Displays an Quote by id" + operationId: editQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/quotes/create: + get: + tags: + - quotes + summary: "Blank quote" + description: "Returns a blank object with default values" + operationId: getQuotesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/quotes/bulk: + post: + tags: + - quotes + summary: "Bulk quote actions" + description: "" + operationId: bulkQuotes + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Hashed ids" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Quote response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/{action}": + get: + deprecated: true + tags: + - quotes + summary: "Performs a custom action on an Quote" + description: "Performs a custom action on an Quote.\n\n The current range of actions are as follows\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - convert\n - convert_to_invoice\n - email" + operationId: actionQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/quote/{invitation_key}/download": + get: + tags: + - quotes + summary: "Download quote PDF" + description: "Downloads a specific quote" + operationId: downloadQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Quote Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the quote pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/upload": + post: + tags: + - quotes + summary: "Upload a quote document" + description: "Handles the uploading of a document to a quote" + operationId: uploadQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Quote object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/invoices: + get: + tags: + - invoices + summary: "List invoices" + description: | + Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. + + operationId: getInvoices + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: client_status + in: query + description: | + A comma separated list of invoice status strings. Valid options include: + - all + - paid + - unpaid + - overdue + required: false + schema: + type: string + example: ?client_status=paid,unpaid + - name: number + in: query + description: | + Search invoices by invoice number + required: false + schema: + type: string + example: ?number=INV-001 + - name: filter + in: query + description: | + Searches across a range of columns including: + - number + - po_number + - date + - amount + - balance + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=bob + - name: without_deleted_clients + in: query + description: | + Returns the invoice list without the invoices of deleted clients. + required: false + schema: + type: string + example: ?without_deleted_clients= + - name: overdue + in: query + description: | + Returns the list of invoices that are overdue + required: false + schema: + type: string + example: ?over_due= + - name: payable + in: query + description: | + Returns the invoice list that are payable for a defined client. Please note, you must pass the client_id as the value for this query parameter + required: false + schema: + type: string + example: ?payable={client_id} + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc number|desc balance|asc + - name: private_notes + in: query + description: | + Searches on the private_notes field of the invoices + required: false + schema: + type: string + example: ?private_notes=super secret + responses: + 200: + description: "A list of invoices" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Invoice" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - invoices + summary: "Create invoice" + description: | + Adds a invoice to a company + + Triggered actions are available when updating or creating an invoice. + These are query parameters that can be chained in order to perform additional actions on the entity, these include: + + ``` + ?send_email=true [Saves and sends the invoice] + ?mark_sent=true [Saves and marks the invoice as sent] + ?paid=true [Saves and marks the invoice as paid] + ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] + ?cancel=true [Saves and marks the invoice as cancelled] + ?save_default_footer=true [Saves the current footer as the default footer] + ?save_default_terms=true [Saves the current terms as the default terms] + ``` + + operationId: storeInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/InvoiceRequest" + responses: + 200: + description: "Returns the saved invoice entity" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/invoices/{id}": + get: + tags: + - invoices + summary: "Show invoice" + description: "Displays an invoice by id" + operationId: showInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + put: + tags: + - invoices + summary: "Update invoice" + description: | + Handles the updating of an invoice by id. + + Triggered actions are available when updating or creating an invoice. + These are query parameters that can be chained in order to perform additional actions on the entity, these include: + + ``` + ?send_email=true [Saves and sends the invoice] + ?mark_sent=true [Saves and marks the invoice as sent] + ?paid=true [Saves and marks the invoice as paid] + ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] + ?cancel=true [Saves and marks the invoice as cancelled] + ?save_default_footer=true [Saves the current footer as the default footer] + ?save_default_terms=true [Saves the current terms as the default terms] + ``` + + operationId: updateInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - invoices + summary: "Delete invoice" + description: "Handles the deletion of an invoice by id" + operationId: deleteInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/invoices/{id}/edit": + get: + tags: + - invoices + summary: "Edit invoice" + description: "Displays an invoice by id for editting" + operationId: editInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/invoices/create: + get: + tags: + - invoices + summary: "Blank invoice" + description: "Returns a blank object with default values" + operationId: getInvoicesCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/invoices/bulk: + post: + tags: + - invoices + summary: "Bulk invoice actions" + description: | + There are multiple actions that are available including: + + operationId: bulkInvoices + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Bulk action details" + required: true + content: + application/json: + schema: + type: object + properties: + action: + required: true + type: string + description: | + The action to be performed, options include: + - `bulk_download` + Bulk download an array of invoice PDFs (These are sent to the admin via email.) + - `download` + Download a single PDF. (Returns a single PDF object) + - `bulk_print` + Merges an array of Invoice PDFs for easy one click printing. + - `auto_bill` + Attempts to automatically bill the invoices with the payment method on file. + - `clone_to_invoice` + Returns a clone of the invoice. + - `clone_to_quote` + Returns a quote cloned using the properties of the given invoice. + - `mark_paid` + Marks an array of invoices as paid. + - `mark_sent` + Marks an array of invoices as sent. + - `restore` + Restores an array of invoices + - `delete` + Deletes an array of invoices + - `archive` + Archives an array of invoices + - `cancel` + Cancels an array of invoices + - `email` + Emails an array of invoices + - `send_email` + Emails an array of invoices. Requires additional properties to be sent. `email_type` + ids: + required: true + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" + type: string + example: + action: bulk_download + ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" + + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/invoices/{id}/{action}": + get: + deprecated: true + tags: + - invoices + summary: "Custom invoice action" + description: | + Performs a custom action on an invoice. + The current range of actions are as follows + - clone_to_invoice + - clone_to_quote + - history + - delivery_note + - mark_paid + - download + - archive + - delete + - email + operationId: actionInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/invoice/{invitation_key}/download": + get: + tags: + - invoices + summary: "Download invoice PDF" + description: "Downloads a specific invoice" + operationId: downloadInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Invoice Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/invoices/{id}/delivery_note": + get: + tags: + - invoices + summary: "Download delivery note" + description: "Downloads a specific invoice delivery notes" + operationId: deliveryNote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hahsed Id" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the invoice delivery note pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/invoices/{id}/upload": + post: + tags: + - invoices + summary: "Add invoice document" + description: "Handles the uploading of a document to a invoice" + operationId: uploadInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Invoice object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Invoice" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/payments: + get: + tags: + - payments + summary: "List payments" + description: "Lists payments, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the payments, these are handled by the PaymentFilters class which defines the methods available" + operationId: getPayments + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: filter + in: query + description: | + Searches across a range of columns including: + - amount + - date + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=10 + - name: number + in: query + description: | + Search payments by payment number + required: false + schema: + type: string + example: ?number=0001 + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc number|desc balance|asc + responses: + 200: + description: "A list of payments" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Payment" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - payments + summary: "Create payment" + description: "Adds an Payment to the system" + operationId: storePayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "The payment request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + responses: + 200: + description: "Returns the saved Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/payments/{id}": + get: + tags: + - payments + summary: "Show payment" + description: "Displays an Payment by id" + operationId: showPayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - payments + summary: "Update payment" + description: "Handles the updating of an Payment by id" + operationId: updatePayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - payments + summary: "Delete payment" + description: "Handles the deletion of an Payment by id" + operationId: deletePayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/payments/{id}/edit": + get: + tags: + - payments + summary: "Edit payment" + description: "Displays an Payment by id" + operationId: editPayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/payments/create: + get: + tags: + - payments + summary: "Blank payment" + description: "Returns a blank object with default values" + operationId: getPaymentsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/payments/refund: + post: + tags: + - payments + summary: "Refund payment" + description: "Adds an Refund to the system" + operationId: storeRefund + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + requestBody: + description: "The refund request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + responses: + 200: + description: "Returns the saved Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/payments/bulk: + post: + tags: + - payments + summary: "Bulk payment actions" + description: "" + operationId: bulkPayments + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Payment response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/payments/{id}/{action}": + get: + deprecated: true + tags: + - payments + summary: "Custom payment actions" + description: "Performs a custom action on an Payment.\n\n The current range of actions are as follows\n - clone_to_Payment\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" + operationId: actionPayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/payments/{id}/upload": + post: + tags: + - payments + summary: "Upload a payment document" + description: "Handles the uploading of a document to a payment" + operationId: uploadPayment + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Payment object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/purchase_orders: + get: + tags: + - Purchase Orders + summary: "List purchase orders" + description: "Lists purchase orders, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available" + operationId: getPurchaseOrders + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of purchase orders" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/PurchaseOrder" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - Purchase Orders + summary: "Create purchase order" + description: "Adds an purchase order to the system" + operationId: storePurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + "/api/v1/purchase_orders/{id}": + get: + tags: + - Purchase Orders + summary: "Show purchase order" + description: "Displays an purchase order by id" + operationId: showPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_order/{id}": + put: + tags: + - Purchase Orders + summary: "Update purchase order" + description: "Handles the updating of an purchase order by id" + operationId: updatePurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - Purchase Orders + summary: "Delete purchase order" + description: "Handles the deletion of an purchase orders by id" + operationId: deletePurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The purhcase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_orders/{id}/edit": + get: + tags: + - Purchase Orders + summary: "Edit purchase order" + description: "Displays an purchase order by id" + operationId: editPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + + /api/v1/purchase_orders/create: + get: + tags: + - Purchase Orders + summary: "Blank purchase order" + description: "Returns a blank object with default values" + operationId: getPurchaseOrderCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/purchase_orders/bulk: + post: + tags: + - Purchase Orders + summary: "Bulk purchase order action" + description: "" + operationId: bulkPurchaseOrderss + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "Purchase Order IDS" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Bulk Action response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_orders/{id}/{action}": + get: + deprecated: true + tags: + - Purchase Orders + summary: "Custom purchase order actions" + description: "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email" + operationId: actionPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Purchase Order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the purchase order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_orders/{id}/upload": + post: + tags: + - Purchase Orders + summary: "Uploads a purchase order document" + description: "Handles the uploading of a document to a purchase_order" + operationId: uploadPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Purchase Order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Purchase Order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/PurchaseOrder" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_order/{invitation_key}/download": + get: + tags: + - Purchase Orders + summary: "Download a purchase order PDF" + description: "Downloads a specific purchase order" + operationId: downloadPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Purchase Order Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Purchase Order pdf" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/tasks: + get: + tags: + - tasks + summary: "List tasks" + description: "Lists tasks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available" + operationId: getTasks + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" + responses: + 200: + description: "A list of tasks" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/Task" + meta: + type: object + $ref: "#/components/schemas/Meta" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + post: + tags: + - tasks + summary: "Create task" + description: "Adds an task to a company" + operationId: storeTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved task object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/tasks/{id}": + get: + tags: + - tasks + summary: "Show task" + description: "Displays a task by id" + operationId: showTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the task object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + put: + tags: + - tasks + summary: "Update task" + description: "Handles the updating of a task by id" + operationId: updateTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the task object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + delete: + tags: + - tasks + summary: "Delete task" + description: "Handles the deletion of a task by id" + operationId: deleteTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/tasks/{id}/edit": + get: + tags: + - tasks + summary: "Edit task" + description: "Displays a task by id" + operationId: editTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/tasks/create: + get: + tags: + - tasks + summary: "Blank task" + description: "Returns a blank task with default values" + operationId: getTasksCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank task object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/tasks/bulk: + post: + tags: + - tasks + summary: "Bulk task actions" + description: "" + operationId: bulkTasks + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Task User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + "/api/v1/tasks/{id}/upload": + post: + tags: + - tasks + summary: "Uploads a task document" + description: "Handles the uploading of a document to a task" + operationId: uploadTask + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: "File Upload Body" + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: PUT + documents: + type: array + items: + description: "Array of binary documents for upload" + type: string + format: binary + responses: + 200: + description: "Returns the Task object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" + /api/v1/tasks/sort: + post: + tags: + - tasks + summary: "Sort tasks on KanBan" + description: "Sorts tasks after drag and drop on the KanBan." + operationId: sortTasks + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns an Ok, 200 HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: "#/components/responses/422" + 429: + $ref: "#/components/responses/429" + 5XX: + description: "Server error" + default: + $ref: "#/components/responses/default" +components: + headers: + X-MINIMUM-CLIENT-VERSION: + description: "The API version" + schema: + type: number + X-RateLimit-Remaining: + description: "The number of requests left for the time window." + schema: + type: integer + X-RateLimit-Limit: + description: "The total number of requests in a given time window." + schema: + type: integer + components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: X-API-TOKEN + responses: + examples: + Client: + - id: Opnel5aKBz + user_id: Ua6Rw4pVbS + assigned_user_id: Ua6Rw4pVbS + company_id: Co7Vn3yLmW + name: "Jim's Housekeeping" + website: https://www.jims-housekeeping.com + private_notes: Client prefers email communication over phone calls + client_hash: asdfkjhk342hjhbfdvmnfb1 + industry_id: 5 + size_id: 2 + address1: 123 Main St + address2: Apt 4B + city: Beverly Hills + state: California + postal_code: 90210 + phone: 555-3434-3434 + country_id: 1 + custom_value1: Email + custom_value2: John Doe + custom_value3: Yes + custom_value4: $50,000 + vat_number: VAT123456 + id_number: ID123456 + number: CL-0001 + shipping_address1: 5 Wallaby Way + shipping_address2: Suite 5 + shipping_city: Perth + shipping_state: Western Australia + shipping_postal_code: 6110 + shipping_country_id: 4 + is_deleted: false + balance: 500.00 + paid_to_date: 2000.00 + credit_balance: 100.00 + last_login: 1628686031 + created_at: 1617629031 + updated_at: 1628445631 + group_settings_id: Opnel5aKBz + routing_id: Opnel5aKBz3489-dfkiu-2239-sdsd + is_tax_exempt: false + has_valid_vat_number: false + payment_balance: 100 + contacts: + - id: Opnel5aKBz + first_name: John + last_name: Doe + email: jim@gmail.com + phone: 555-3434-3434 + send_invoice: true + custom_value1: Email + custom_value2: John Doe + custom_value3: Yes + custom_value4: $50,000 + is_primary: true + created_at: 1617629031 + updated_at: 1628445631 + deleted_at: 1628445631 + Meta: + value: + pagination: + total: 1 + count: 1 + per_page: 20 + current_page: 1 + total_pages: 1 + links: + - first: https://invoicing.co/api/v1/invoices?page=1 + - last: https://invoicing.co/api/v1/invoices?page=1 + - prev: null + - next: null + 403: + description: "Authorization error" + content: + application/json: + schema: + $ref: "#components/schemas/AuthorizationError" + + default: + description: "Unexpected Error" + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 429: + description: "Rate Limit Exceeded" + content: + application/json: + schema: + $ref: "#/components/schemas/RateLimiterError" + 422: + description: "Validation error" + content: + application/json: + schema: + $ref: "#/components/schemas/ValidationError" + 401: + description: "Authentication error" + content: + application/json: + schema: + $ref: "#components/schemas/AuthenticationError" + 400: + description: "Invalid user input" + content: + application/json: + schema: + $ref: "#components/schemas/InvalidInputError" + parameters: + X-API-SECRET: + name: X-API-SECRET + in: header + description: "The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route." + required: false + schema: + type: string + example: password + X-Requested-With: + name: X-Requested-With + in: header + description: "Used to send the XMLHttpRequest header" + required: true + schema: + type: string + readOnly: true + example: XMLHttpRequest + X-API-TOKEN: + name: X-API-TOKEN + in: header + description: "The API token to be used for authentication" + required: true + schema: + type: string + example: TOKEN + X-API-PASSWORD: + name: X-API-PASSWORD + in: header + description: "The login password when challenged on certain protected routes" + required: true + schema: + type: string + example: supersecretpassword + bank_integration_include: + name: include + in: query + description: Include child relations of the BankIntegration object. Format is comma separated. + required: false + schema: + type: string + examples: + company: + value: company + summary: The associated Company + account: + value: account + summary: The associated Account + bank_transactions: + value: bank_transactions + summary: The associated Bank Transactions + client_include: + name: include + in: query + description: Include child relationships of the Client Object. + required: false + schema: + type: string + examples: + activities: + value: activities + summary: include=activities will include the activities object in the response + ledger: + value: ledger + summary: include=ledger will include the ledger object in the response + system_logs: + value: system_logs + summary: include=system_logs will include the system_logs object in the response + activity_include: + name: include + in: query + description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token + required: false + schema: + type: string + examples: + history: + value: history + summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity) + user: + value: user + summary: include=user will include the user object in the response + client: + value: client + summary: include=client will include the client object in the response + recurring_invoice: + value: recurring_invoice + summary: include=recurring_invoice will include the recurring_invoice object in the response + invoice: + value: invoice + summary: include=invoice will include the invoice object in the response + credit: + value: credit + summary: include=credit will include the credit object in the response + quote: + value: quote + summary: include=quote will include the quote object in the response + payment: + value: payment + summary: include=payment will include the payment object in the response + expense: + value: expense + summary: include=expense will include the expense object in the response + vendor_contact: + value: vendor_contact + summary: include=vendor_contact will include the vendor_contact object in the response + vendor: + value: vendor + summary: include=vendor will include the vendor object in the response + purchase_order: + value: purchase_order + summary: include=purchase_order will include the purchase_order object in the response + task: + value: task + summary: include=task will include the task object in the response + login_include: + name: include + in: query + description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token + required: false + schema: + type: string + examples: + user: + value: user + summary: include=user will include the user object in the response + company: + value: company + summary: include=company will include the company object in the response + token: + value: token + summary: include=token will include the token object in the response + account: + value: account + summary: include=account will include the account object in the response + per_page_meta: + name: per_page + in: query + description: The number of records to return for each request, default is 20 + required: false + schema: + type: int + example: 20 + page_meta: + name: page + in: query + description: The page number to return for this request (when performing pagination), default is 1 + required: false + schema: + type: int + example: 1 + include: + name: include + in: query + description: "Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes" + required: false + schema: + type: string + example: "first_load" + include_static: + name: include_static + in: query + description: "Returns static variables" + required: false + schema: + type: string + example: include_static=true + clear_cache: + name: clear_cache + in: query + description: "Clears the static cache" + required: false + schema: + type: string + example: clear_cache=true + index: + name: index + in: query + description: "Replaces the default response index from data to a user specific string" + required: false + schema: + type: string + example: user + api_version: + name: api_version + in: query + description: "The API version" + required: false + schema: + type: number + example: user + + ########################### Generic filters available across all filter ################################## + status: + name: status + in: query + description: | + Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options: + - active + - archived + - deleted + required: false + schema: + type: string + example: ?status=archived,deleted + client_id: + name: client_id + in: query + description: | + Filters the entity list by client_id. Suitable when you only want the entities of a specific client. + required: false + schema: + type: string + example: ?client_id={client_id} created_at: - description: 'The timestamp when the client was created' - type: number - format: integer - example: '1617629031' - readOnly: true + name: created_at + in: query + description: | + Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp + required: false + schema: + type: integer + example: ?created_at=2022-01-10 updated_at: - description: 'The timestamp when the client was last updated' - type: number - format: integer - example: '1628445631' - readOnly: true - group_settings_id: - description: 'The group settings assigned to the client' - type: string - example: Opnel5aKBz - routing_id: - description: 'The routing address id for e-invoicing for this client' - type: string - example: Opnel5aKBz3489-dfkiu-2239-sdsd - is_tax_exempt: - description: 'Flag which defines if the client is exempt from taxes' - type: boolean - example: false - has_valid_vat_number: - description: 'Flag which defines if the client has a valid VAT number' - type: boolean - example: false - readOnly: true - payment_balance: - description: 'Defines the payment balance the client has on file (pre payments / over payments / unapplied amounts)' - type: number - example: 100 - readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' - type: object - Vendor: - properties: - id: - description: 'The hashed id of the vendor. This is a unique identifier for the vendor.' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user who created the vendor. This is a unique identifier for the user.' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company. This is a unique identifier for the company.' - type: string - example: Opnel5aKBz - contacts: - type: array - items: - $ref: '#/components/schemas/VendorContact' - description: 'An array of contacts associated with the vendor.' - name: - description: 'The name of the vendor.' - type: string - example: 'Harry cafe de wheels' - classification: - description: 'The classification of the vendor.' - type: string - example: 'individual' - website: - description: 'The website of the vendor.' - type: string - example: www.harry.com - private_notes: - description: 'The private notes of the vendor. These notes are only visible to users with appropriate permissions.' - type: string - example: 'Shhh, do not tell the vendor' - industry_id: - description: 'The industry id of the vendor. This is a unique identifier for the industry.' - type: string - example: '1' - size_id: - description: 'The size id of the vendor. This is a unique identifier for the size of the vendor.' - type: string - example: '' - address1: - description: 'The first line of the vendor''s address.' - type: string - example: '' - address2: - description: 'The second line of the vendor''s address.' - type: string - example: '' - city: - description: 'The city of the vendor''s address.' - type: string - example: '' - state: - description: 'The state of the vendor''s address.' - type: string - example: '' - postal_code: - description: 'The postal code of the vendor''s address.' - type: string - example: '' - phone: - description: 'The phone number of the vendor.' - type: string - example: 555-3434-3434 - country_id: - description: 'The country id of the vendor. This is a unique identifier for the country.' - type: string - example: '' - currency_id: - description: 'The currency id of the vendor. This is a unique identifier for the currency.' - type: string - example: '4' - custom_value1: - description: 'The value of the first custom field for the vendor.' - type: string - example: '' - custom_value2: - description: 'The value of the second custom field for the vendor.' - type: string - example: '' - custom_value3: - description: 'The value of the third custom field for the vendor.' - type: string - example: '' - custom_value4: - description: 'The value of the fourth custom field for the vendor.' - type: string - example: '' - vat_number: - description: 'The VAT number of the vendor.' - type: string - example: '' - id_number: - description: 'The ID number of the vendor.' - type: string - example: '' - number: - description: 'The number of the vendor' - type: string - example: '11234' + name: updated_at + in: query + description: | + Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp + required: false + schema: + type: integer + example: ?updated_at=2022-01-10 is_deleted: - description: 'Boolean flag determining if the vendor has been deleted' - type: boolean - example: true - language_id: - description: 'The language id of the vendor. This is a unique identifier for the language.' - type: string - example: '1' - vendor_hash: - description: 'The vendor hash of the vendor. This is a unique identifier for the vendor.' - type: string - example: 'aaa-sss-www' - readOnly: true - transaction_name: - description: 'The transaction name of the vendor.' - type: string - example: 'aaa-sss-www' - last_login: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - display_name: - description: 'The display name of the vendor.' - type: string - example: 'Bob the vendor' - readOnly: true - type: object - VendorContact: - properties: - id: - description: 'The hashed id of the vendor contact' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user id' - type: string - example: Opnel5aKBz - readOnly: true - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - readOnly: true + name: is_deleted + in: query + description: | + Filters the entity list by entities that have been deleted. + required: false + schema: + type: booleans + example: ?is_deleted=true vendor_id: - description: 'The hashed id of the vendor' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' - type: string - example: Harry - last_name: - description: 'The last name of the contact' - type: string - example: Windsor - contact_key: - description: 'A unique identifier for the contact' - type: string - example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a - readOnly: true - confirmation_code: - description: 'The confirmation code used to authenticate the contacts email address' - type: string - example: 333-sdjkh34gbasd - readOnly: true - phone: - description: 'The contacts phone number' - type: string - example: 555-123-1234 - custom_value1: - description: 'A custom value' - type: string - example: '2022-10-10' - custom_value2: - description: 'A custom value' - type: string - example: $1000 - custom_value3: - description: 'A custom value' - type: string - example: '' - custom_value4: - description: 'A custom value' - type: string - example: '' - email: - description: 'The contact email address' - type: string - example: harry@windsor.com - email_verified_at: - description: 'The date which the contact confirmed their email' - type: number - format: integer - example: '134341234234' - readOnly: true - password: - description: 'The hashed password of the contact' - type: string - example: '*****' - is_primary: - description: 'Boolean flag determining if the contact is the primary contact for the vendor' - type: boolean - example: true - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - type: object - Quote: - properties: - id: - description: 'The unique hashed identifier for the quote' - type: string - example: Opnel5aKBz - user_id: - description: 'The unique hashed identifier for the user who created the quote' - type: string - example: '' - assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the quote' - type: string - example: '' - company_id: - description: 'The unique hashed identifier for the company associated with the quote' - type: string - example: '' - client_id: - description: 'The unique hashed identifier for the client associated with the quote' - type: string - example: '' - status_id: - description: 'The status of the quote represented by a unique identifier' - type: string - example: '' - number: - description: 'The unique alpha-numeric quote number for the quote per company' - type: string - example: QUOTE_101 - po_number: - description: 'The purchase order number associated with the quote' - type: string - example: PO-1234 - terms: - description: 'The terms and conditions for the quote' - type: string - example: 'These are some quote terms. Valid for 14 days.' - public_notes: - description: 'Publicly visible notes associated with the quote' - type: string - example: 'These are public notes which the client may see' - private_notes: - description: 'Privately visible notes associated with the quote, not disclosed to the client' - type: string - example: 'These are private notes, not to be disclosed to the client' - footer: - description: 'The footer text of the quote' - type: string - example: 'The text goes in the footer of the quote' - custom_value1: - description: 'First custom value field for additional information' - type: string - example: 'A custom value' - custom_value2: - description: 'Second custom value field for additional information' - type: string - example: 'A custom value' - custom_value3: - description: 'Third custom value field for additional information' - type: string - example: 'A custom value' - custom_value4: - description: 'Fourth custom value field for additional information' - type: string - example: 'A custom value' - tax_name1: - description: 'The name of the first tax applied to the quote' - type: string - example: GST - tax_name2: - description: 'The name of the second tax applied to the quote' - type: string - example: VAT - tax_rate1: - description: 'The rate of the first tax applied to the quote' - type: number - format: float - example: 10.00 - tax_rate2: - description: 'The rate of the second tax applied to the quote' - type: number - format: float - example: 10.00 - tax_name3: - description: 'The name of the third tax applied to the quote' - type: string - example: '' - tax_rate3: - description: 'The rate of the third tax applied to the quote' - type: number - format: float - example: 10.00 - total_taxes: - description: 'The total amount of taxes for the quote' - type: number - format: float - example: 10.00 - line_items: - type: array - description: 'An array of objects which define the line items of the quote' - items: - $ref: '#/components/schemas/InvoiceItem' - amount: - description: 'The total amount of the quote before taxes and discounts' - type: number - format: float - example: 10.00 - balance: - description: 'The balance due for the quote after accounting for payments' - type: number - format: float - example: 10.00 - paid_to_date: - description: 'The total amount paid on the quote so far' - type: number - format: float - example: 10.00 - discount: - description: 'The discount amount or percentage applied to the quote' - type: number - format: float - example: 10.00 - partial: - description: 'The partial or deposit amount for the quote' - type: number - format: float - example: 10.00 - is_amount_discount: - description: 'Boolean flag indicating if the discount is a fixed amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Boolean flag indicating if the quote has been deleted' - type: boolean - example: false - uses_inclusive_taxes: - description: 'Boolean flag indicating if the taxes used are inclusive or exclusive' - type: boolean - example: true - date: - description: 'The date the quote was created' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the quote was sent to the client' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The next scheduled date for sending a reminder for the quote' - type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the partial or deposit amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date for the total amount of the quote' - type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: 'The timestamp of the last time the quote was viewed' - type: number - format: integer - example: 1434342123 - updated_at: - description: 'The timestamp of the last update to the quote' - type: number - format: integer - example: 1434342123 - archived_at: - description: 'The timestamp of when the quote was archived' - type: number - format: integer - example: 1434342123 - custom_surcharge1: - description: 'First custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge2: - description: 'Second custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge3: - description: 'Third custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge4: - description: 'Fourth custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge_tax1: - description: 'Boolean flag indicating if taxes are charged on the first custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Boolean flag indicating if taxes are charged on the second custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Boolean flag indicating if taxes are charged on the third custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Boolean flag indicating if taxes are charged on the fourth custom surcharge amount' - type: boolean - example: true - type: object - Payment: - properties: - id: - description: 'The payment hashed id' - type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - invitation_id: - description: 'The invitation hashed id' - type: string - example: Opnel5aKBz - client_contact_id: - description: 'The client contact hashed id' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - type_id: - description: 'The Payment Type ID' - type: string - example: '1' - date: - description: 'The Payment date' - type: string - example: 1-1-2014 - transaction_reference: - description: 'The transaction reference as defined by the payment gateway' - type: string - example: xcsSxcs124asd - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - private_notes: - description: 'The private notes of the payment' - type: string - example: 'The payment was refunded due to error' - is_manual: - description: 'Flags whether the payment was made manually or processed via a gateway' - type: boolean - example: true - is_deleted: - description: 'Defines if the payment has been deleted' - type: boolean - example: true - amount: - description: 'The amount of this payment' - type: number - example: 10 - refunded: - description: 'The refunded amount of this payment' - type: number - example: 10 - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - company_gateway_id: - description: 'The company gateway id' - type: string - example: '3' - paymentables: - $ref: '#/components/schemas/Paymentable' - invoices: - description: '' - type: array - items: - $ref: '#/components/schemas/InvoicePaymentable' - credits: - description: '' - type: array - items: - $ref: '#/components/schemas/CreditPaymentable' - number: - description: 'The payment number - is a unique alpha numeric number per payment per company' - type: string - example: PAY_101 - type: object - - Task: - properties: - id: - description: 'The hashed id of the task' - type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the task' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user of the task' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - client_id: - description: 'The hashed if of the client' - type: string - example: Opnel5aKBz - invoice_id: - description: 'The hashed id of the invoice associated with the task' - type: string - example: Opnel5aKBz - project_id: - description: 'The hashed id of the project associated with the task' - type: string - example: Opnel5aKBz - number: - description: 'The number of the task' - type: string - example: TASK-123 - time_log: - description: 'An array of unix time stamps defining the start and end times of the task' - type: string - example: '[[1,2],[3,4]]' - is_running: - description: 'Determines if the task is still running' - type: boolean - example: true - is_deleted: - description: 'Boolean flag determining if the task has been deleted' - type: boolean - example: true - task_status_id: - description: 'The hashed id of the task status' - type: string - example: Opnel5aKBz - description: - description: 'The task description' - type: string - example: 'A wonder task to work on' - duration: - description: 'The task duration in seconds' - type: integer - example: '3600' - task_status_order: - description: 'The order of the task' - type: integer - example: '4' - rate: - description: 'The task rate' - type: number - example: 10.00 - custom_value1: - description: 'A custom value' - type: string - example: '2022-10-10' - custom_value2: - description: 'A custom value' - type: string - example: $1100 - custom_value3: - description: 'A custom value' - type: string - example: 'I need help' - custom_value4: - description: 'A custom value' - type: string - example: INV-3343 - is_date_based: - description: 'Boolean flag determining if the task is date based' - type: boolean - example: true - calculated_start_date: - description: 'The calculated start date of the task' - type: string - example: '2022-10-10' - readOnly: true - invoice_documents: - description: "Boolean flags which determines whether to include the task documents on the invoice" - type: boolean - example: true - created_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - readOnly: true - type: object - RecurringInvoice: - properties: - id: - description: 'The hashed id of the recurring invoice' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - status_id: - description: 'The invoice status variable' - type: string - example: '4' - frequency_id: - description: 'The recurring invoice frequency' - type: number - example: '4' - remaining_cycles: - description: 'The number of invoices left to be generated' - type: number - example: '4' - number: - description: 'The recurringinvoice number - is a unique alpha numeric number per invoice per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this recurring invoice' - type: string - example: PO-1234 - terms: - description: 'The invoice terms' - type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' - type: string - example: 'These are some public notes' - private_notes: - description: 'The private notes of the invoice' - type: string - example: 'These are some private notes' - footer: - description: 'The invoice footer notes' - type: string - example: '' - custom_value1: - description: 'A custom field value' - type: string - example: '2022-10-01' - custom_value2: - description: 'A custom field value' - type: string - example: 'Something custom' - custom_value3: - description: 'A custom field value' - type: string - example: '' - custom_value4: - description: 'A custom field value' - type: string - example: '' - tax_name1: - description: 'The tax name' - type: string - example: '' - tax_name2: - description: 'The tax name' - type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' - type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the invoice' - type: number - format: float - example: '10.00' - line_items: - description: 'An array of objects which define the line items of the invoice' - type: object - example: '' - amount: - description: 'The invoice amount' - type: number - format: float - example: '10.00' - balance: - description: 'The invoice balance' - type: number - format: float - example: '10.00' - paid_to_date: - description: 'The amount paid on the invoice to date' - type: number - format: float - example: '10.00' - discount: - description: 'The invoice discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Defines if the invoice has been deleted' - type: boolean - example: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' - type: boolean - example: true - date: - description: 'The Invoice Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the invoice was sent out' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The Next date for a reminder to be sent' - type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the deposit/partial amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the invoice' - type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - type: object - - InvoiceItem: - type: object - properties: - quantity: - type: number - example: 1 - description: 'The quantity of the product offered for this line item' - cost: - type: number - format: float - example: 10.00 - description: 'The cost of the product offered for this line item' - product_key: - type: string - example: 'Product key' - description: 'The product key of the product offered for this line item (Referred to as Product in the product tab)' - product_cost: - type: number - format: float - example: 10.00 - description: 'The cost of the product offered for this line item (Referred to as Cost in the product tab)' - notes: - type: string - example: 'Item notes' - description: 'The notes/description for the product offered for this line item' - discount: - type: number - format: float - example: 5.00 - description: 'The discount applied to the product offered for this line item' - is_amount_discount: - type: boolean - example: false - description: 'Indicates whether the discount applied to the product offered for this line item is a fixed amount or a percentage' - tax_name1: - type: string - example: 'GST' - description: 'The name of the first tax applied to the product offered for this line item' - tax_rate1: - type: number - format: float - example: 10.00 - description: 'The rate of the first tax applied to the product offered for this line item' - tax_name2: - type: string - example: 'VAT' - description: 'The name of the second tax applied to the product offered for this line item' - tax_rate2: - type: number - format: float - example: 5.00 - description: 'The rate of the second tax applied to the product offered for this line item' - tax_name3: - type: string - example: 'CA Sales Tax' - description: 'The name of the third tax applied to the product offered for this line item' - tax_rate3: - type: number - format: float - example: 3.00 - description: 'The rate of the third tax applied to the product offered for this line item' - sort_id: - type: string - example: '0' - description: 'Deprecated' - deprecated: true - line_total: - type: number - format: float - example: 10.00 - description: 'The total amount of the product offered for this line item' - readOnly: true - gross_line_total: - type: number - format: float - example: 15.00 - description: 'The total amount of the product offered for this line item before discounts' - readOnly: true - tax_amount: - type: number - format: float - example: 1.00 - description: 'The total amount of tax applied to the product offered for this line item' - readOnly: true - date: - type: string - format: date-time - example: '2023-03-19T00:00:00Z' - description: 'Deprecated' - deprecated: true - custom_value1: - type: string - example: 'Custom value 1' - description: 'The first custom value of the product offered for this line item' - custom_value2: - type: string - example: 'Custom value 2' - description: 'The second custom value of the product offered for this line item' - custom_value3: - type: string - example: 'Custom value 3' - description: 'The third custom value of the product offered for this line item' - custom_value4: - type: string - example: 'Custom value 4' - description: 'The fourth custom value of the product offered for this line item' - type_id: - type: string - example: '1' - description: '1 = product, 2 = service, 3 unpaid gateway fee, 4 paid gateway fee, 5 late fee, 6 expense' - default: '1' - tax_id: - type: string - example: '1' - default: '1' - description: 'The tax ID of the product: 1 product, 2 service, 3 digital, 4 shipping, 5 exempt, 5 reduced tax, 7 override, 8 zero rate, 9 reverse tax' - Activity: - properties: - id: - description: 'The id field of the activity' - type: string - example: Opnel5aKBz - activity_type_id: - description: 'The activity type id' - type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - invoice_id: - description: 'The invoice hashed id' - type: string - example: Opnel5aKBz - payment_id: - description: 'The payment hashed id' - type: string - example: Opnel5aKBz - credit_id: - description: 'The credit hashed id' - type: string - example: Opnel5aKBz - updated_at: - description: 'Unixtimestamp the last time the record was updated' - type: integer - example: '343421434' - expense_id: - description: 'The expense hashed id' - type: string - example: Opnel5aKBz - is_system: - description: 'Defines is the activity was performed by the system' - type: boolean - example: true - contact_id: - description: 'The contact hashed id' - type: string - example: Opnel5aKBz - task_id: - description: 'The task hashed id' - type: string - example: Opnel5aKBz - notes: - description: 'Activity Notes' - type: string - example: Opnel5aKBz - token_id: - description: 'The hashed ID of the token who performed the action' - type: string - example: Opnel5aKBz - ip: - description: 'The IP Address of the user who performed the action' - type: string - example: 192.168.1.252 - user: - $ref: '#/components/schemas/User' - client: - $ref: '#/components/schemas/Client' - contact: - $ref: '#/components/schemas/ClientContact' - recurring_invoice: - $ref: '#/components/schemas/RecurringInvoice' - invoice: - $ref: '#/components/schemas/Invoice' - credit: - $ref: '#/components/schemas/Credit' - quote: - $ref: '#/components/schemas/Quote' - payment: - $ref: '#/components/schemas/Payment' - expense: - $ref: '#/components/schemas/Expense' - task: - $ref: '#/components/schemas/Task' - purchase_order: - $ref: '#/components/schemas/PurchaseOrder' - vendor: - $ref: '#/components/schemas/Vendor' - vendor_contact: - $ref: '#/components/schemas/VendorContact' - type: object + name: vendor_id + in: query + description: | + Filters the entity list by an associated vendor + required: false + schema: + type: string + example: ?vendor_id={vendor_id} + filter_deleted_clients: + name: filter_deleted_clients + in: query + description: | + Filters the entity list and only returns entities for clients that have not been deleted + required: false + schema: + type: string + example: ?filter_deleted_clients=true + ########################### Generic filters available across all filter ################################## - ProductBulkAction: - required: - - action - - ids - properties: - action: - type: string - example: archive - description: 'The action to perform ie. archive / restore / delete / set_tax_id' - ids: - type: array - items: - format: string - type: string - example: 2J234DFA,D2J234DFA,D2J234DFA - description: string array of client hashed ids - tax_id: - type: string - example: '1' - description: | - The tax rate id to set on the list of products + schemas: + CreditPaymentable: + properties: + credit_id: + description: "The credit hashed id" + type: string + example: Opnel5aKBz + amount: + description: "The credit amount" + type: string + example: "2" + type: object + GenericReportSchema: + properties: + date_range: + description: "The string representation of the date range of data to be returned" + type: string + example: last7 + date_key: + description: "The date column to search between." + type: string + example: created_at + start_date: + description: "The start date to search between" + type: string + example: "2000-10-31" + end_date: + description: "The end date to search between" + type: string + example: "2" + report_keys: + type: array + items: + description: "Array of Keys to export" + type: string + example: "['name','date']" + type: object + GroupSetting: + properties: + id: + description: "The group setting hashed id" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + name: + description: "The name of the group" + type: string + example: "A groupies group" + settings: + description: "The settings object" + type: object + example: "" + type: object + InvoicePaymentable: + properties: + invoice_id: + description: ______ + type: string + example: Opnel5aKBz + amount: + description: ______ + type: string + example: "2" + type: object - The following constants are available (default = '1') - - ``` - PRODUCT_TYPE_PHYSICAL = '1' - PRODUCT_TYPE_SERVICE = '2' - PRODUCT_TYPE_DIGITAL = '3' - PRODUCT_TYPE_SHIPPING = '4' - PRODUCT_TYPE_EXEMPT = '5' - PRODUCT_TYPE_REDUCED_TAX = '6' - PRODUCT_TYPE_OVERRIDE_TAX = '7' - PRODUCT_TYPE_ZERO_RATED = '8' - PRODUCT_TYPE_REVERSE_TAX = '9' - ``` - type: object - RecurringExpense: - properties: - id: - description: 'The hashed id of the recurring expense' - type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the recurring expense' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The hashed id of the user assigned to this recurring expense' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - client_id: - description: 'The hashed id of the client' - type: string - example: Opnel5aKBz - invoice_id: - description: 'The hashed id of the invoice' - type: string - example: Opnel5aKBz - bank_id: - description: 'The id of the bank associated with this recurring expense' - type: string - example: '22' - invoice_currency_id: - description: 'The currency id of the invoice associated with this recurring expense' - type: string - example: '1' - expense_currency_id: - description: 'The currency id of the expense associated with this recurring expense' - type: string - example: '1' - invoice_category_id: - description: 'The category id of the invoice' - type: string - example: '1' - payment_type_id: - description: 'The payment type id' - type: string - example: '1' - private_notes: - description: 'The recurring expense private notes' - type: string - example: 'Private and confidential' - public_notes: - description: 'The recurring expense public notes' - type: string - example: 'This is the best client in the world' - transaction_reference: - description: 'The recurring expense transaction reference' - type: string - example: EXP-1223-2333 - transcation_id: - description: 'The transaction id of the recurring expense' - type: string - example: '1233312312' - custom_value1: - description: 'Custom value field' - type: string - example: $1000 - custom_value2: - description: 'Custom value field' - type: string - example: '2022-10-10' - custom_value3: - description: 'Custom value field' - type: string - example: 'short text' - custom_value4: - description: 'Custom value field' - type: string - example: 'very long text' - tax_name1: - description: 'The tax name' - type: string - example: GST - tax_name2: - description: 'The tax name' - type: string - example: VAT - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' - type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - amount: - description: 'The total amount of the recurring expense' - type: number - format: float - example: '10.00' - frequency_id: - description: 'The frequency this recurring expense fires' - type: number - format: int - example: '1' - remaining_cycles: - description: 'The number of remaining cycles for this recurring expense' - type: number - format: int - example: '1' - foreign_amount: - description: 'The foreign currency amount of the recurring expense' - type: number - format: float - example: '10.00' - exchange_rate: - description: 'The exchange rate for the expernse' - type: number - format: float - example: '0.80' - date: - description: 'The date of the expense' - type: string - example: '' - payment_date: - description: 'The date the expense was paid' - type: string - example: '' - should_be_invoiced: - description: 'Boolean flag determining if the expense should be invoiced' - type: boolean - example: true - is_deleted: - description: 'Boolean flag determining if the recurring expense is deleted' - type: boolean - example: true - last_sent_date: - description: 'The Date it was sent last' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The next send date' - type: string - format: date - example: '1994-07-30' - invoice_documents: - description: 'Boolean flag determining if the documents associated with this expense should be passed onto the invoice if it is converted to an invoice' - type: boolean - example: true - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - type: object - PaymentTerm: - properties: - num_days: - description: 'The payment term length in days' - type: integer - example: '1' - name: - description: 'The payment term length in string format' - type: string - example: 'NET 1' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - archived_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - ClientGatewayToken: - properties: - id: - description: 'The hashed id of the client gateway token' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: '2' - client_id: - description: 'The hashed_id of the client' - type: string - example: '2' - token: - description: 'The payment token' - type: string - example: '2' - routing_number: - description: 'THe bank account routing number' - type: string - example: '2' - company_gateway_id: - description: 'The hashed id of the company gateway' - type: string - example: '2' - is_default: - description: 'Flag determining if the token is the default payment method' - type: boolean - example: 'true' - type: object - User: - properties: - id: - description: 'The hashed id of the user' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the user' - type: string - example: Brad - last_name: - description: 'The last name of the user' - type: string - example: Pitt - email: - description: 'The users email address' - type: string - example: brad@pitt.com - phone: - description: 'The users phone number' - type: string - example: 555-1233-23232 - signature: - description: 'The users sign off signature' - type: string - example: 'Have a nice day!' - avatar: - description: 'The users avatar' - type: string - example: 'https://url.to.your/avatar.png' - accepted_terms_version: - description: 'The version of the invoice ninja terms that has been accepted by the user' - type: string - example: 1.0.1 - readOnly: true - oauth_user_id: - description: 'The provider id of the oauth entity' - type: string - example: jkhasdf789as6f675sdf768sdfs - readOnly: true - oauth_provider_id: - description: 'The oauth entity id' - type: string - example: google - readOnly: true - language_id: - description: 'The language id of the user' - type: string - example: 1 - verified_phone_number: - description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' - type: boolean - example: true - readOnly: true - sms_verification_code: - description: 'The sms verification code for the user. Required to settings up 2FA' - type: string - example: '123456' - readOnly: true - oauth_user_token_expiry: - description: 'The expiry date of the oauth token' - type: string - example: '2022-10-10' - readOnly: true - has_password: - description: 'Boolean flag determining if the user has a password' - type: boolean - example: true - readOnly: true - last_confirmed_email_address: - description: 'The last confirmed email address of the user' - type: string - example: 'bob@gmail.com' - readOnly: true - custom_value1: - description: 'A custom value' - type: string - example: 'Custom value 1' - custom_value2: - description: 'A custom value' - type: string - example: '$1000' - custom_value3: - description: 'A custom value' - type: string - example: 'Custom value 3' - custom_value4: - description: 'A custom value' - type: string - example: 'Custom value 4' - is_deleted: - description: 'Boolean flag determining if the user has been deleted' - type: boolean - example: true - readOnly: true - google_2fa_secret: - description: 'The google 2fa secret for the user' - type: string - example: '123456' - readOnly: true - company_user: - $ref: '#/components/schemas/CompanyUser' - type: object - CompanyGateway: - properties: - id: - description: 'The hashed id of the company gateway' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: '2' - gateway_key: - description: 'The gateway key (hash)' - type: string - example: '2' - accepted_credit_cards: - description: 'Bitmask representation of cards' - type: integer - example: '32' - require_billing_address: - description: 'Determines if the the billing address is required prior to payment.' - type: boolean - example: true - require_shipping_address: - description: 'Determines if the the billing address is required prior to payment.' - type: boolean - example: true - config: - description: 'The configuration map for the gateway' - type: string - example: dfadsfdsafsafd - update_details: - description: 'Determines if the client details should be updated.' - type: boolean - example: true - fees_and_limits: - description: 'A mapped collection of the fees and limits for the configured gateway' - type: array - items: - $ref: '#/components/schemas/FeesAndLimits' - type: object - - - Document: - properties: - id: - description: 'The document hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: '' - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: '' - project_id: - description: 'The project associated with this document' - type: string - example: '' - vendor_id: - description: 'The vendor associated with this documents' - type: string - example: '' - name: - description: 'The document name' - type: string - example: Beauty - url: - description: 'The document url' - type: string - example: Beauty - preview: - description: 'The document preview url' - type: string - example: Beauty - type: - description: 'The document type' - type: string - example: Beauty - disk: - description: 'The document disk' - type: string - example: Beauty - hash: - description: 'The document hashed' - type: string - example: Beauty - is_deleted: - description: 'Flag to determine if the document is deleted' - type: boolean - example: true - is_default: - description: 'Flag to determine if the document is a default doc' - type: boolean - example: true - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - PurchaseOrder: - properties: - id: - description: 'The unique hashed identifier for the purchase order' - type: string - example: Opnel5aKBz - user_id: - description: 'The unique hashed identifier for the user who created the purchase order' - type: string - example: '' - assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the purchase order' - type: string - example: '' - company_id: - description: 'The unique hashed identifier for the company associated with the purchase order' - type: string - example: '' - vendor_id: - description: 'The unique hashed identifier for the vendor associated with the purchase order' - type: string - example: '' - status_id: - description: 'The status of the purchase order represented by a unique identifier' - type: string - example: '' - number: - description: 'The unique alpha-numeric purchase order number per company' - type: string - example: PO_101 - quote_number: - description: 'The quote number associated with this purchase order' - type: string - example: QUOTE_101 - terms: - description: 'The terms and conditions for the purchase order' - type: string - example: 'These are some purchase order terms. Valid for 14 days.' - public_notes: - description: 'Publicly visible notes associated with the purchase order' - type: string - example: 'These are public notes which the vendor may see' - private_notes: - description: 'Privately visible notes associated with the purchase order, not disclosed to the vendor' - type: string - example: 'These are private notes, not to be disclosed to the vendor' - footer: - description: 'The footer text of the purchase order' - type: string - example: 'The text goes in the footer of the purchase order' - custom_value1: - description: 'First custom value field for additional information' - type: string - example: 'A custom value' - custom_value2: - description: 'Second custom value field for additional information' - type: string - example: 'A custom value' - custom_value3: - description: 'Third custom value field for additional information' - type: string - example: 'A custom value' - custom_value4: - description: 'Fourth custom value field for additional information' - type: string - example: 'A custom value' - tax_name1: - description: 'The name of the first tax applied to the purchase order' - type: string - example: GST - tax_name2: - description: 'The name of the second tax applied to the purchase order' - type: string - example: VAT - tax_rate1: - description: 'The rate of the first tax applied to the purchase order' - type: number - format: float - example: 10.00 - tax_rate2: - description: 'The rate of the second tax applied to the purchase order' - type: number - format: float - example: 10.00 - tax_name3: - description: 'The name of the third tax applied to the purchase order' - type: string - example: '' - tax_rate3: - description: 'The rate of the third tax applied to the purchase order' - type: number - format: float - example: 10.00 - total_taxes: - description: 'The total amount of taxes applied to the purchase order' - type: number - format: float - example: 10.00 - line_items: - type: array - description: 'An array of objects which define the line items of the purchase order' - items: - $ref: '#/components/schemas/InvoiceItem' - amount: - description: 'The total amount of the purchase order before taxes and discounts' - type: number - format: float - example: 10.00 - balance: - description: 'The balance due for the purchase order after accounting for payments' - type: number - format: float - example: 10.00 - paid_to_date: - description: 'The total amount paid on the purchase order so far' - type: number - format: float - example: 10.00 - discount: - description: 'The discount amount or percentage applied to the purchase order' - type: number - format: float - example: 10.00 - partial: - description: 'The partial or deposit amount for the purchase order' - type: number - format: float - example: 10.00 - is_amount_discount: - description: 'Boolean flag indicating if the discount is a fixed amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Boolean flag indicating if the purchase order has been deleted' - type: boolean - example: false - uses_inclusive_taxes: - description: 'Boolean flag indicating if the taxes used are inclusive or exclusive' - type: boolean - example: true - date: - description: 'The date the purchase order was created' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the purchase order was sent to the vendor' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The next scheduled date for sending a reminder for the purchase order' - type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the partial or deposit amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date for the total amount of the purchase order' - type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp - type: number - format: integer - example: 1434342123 - updated_at: - description: Timestamp - type: number - format: integer - example: 1434342123 - archived_at: - description: Timestamp - type: number - format: integer - example: 1434342123 - custom_surcharge1: - description: 'First custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge2: - description: 'Second custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge3: - description: 'Third custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge4: - description: 'Fourth custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge_tax1: - description: 'Boolean flag indicating if taxes are charged on the first custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Boolean flag indicating if taxes are charged on the second custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Boolean flag indicating if taxes are charged on the third custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Boolean flag indicating if taxes are charged on the fourth custom surcharge amount' - type: boolean - example: true - type: object + TaskSchedulerSchema: + properties: + paused: + description: "The scheduler paused state" + type: boolean + example: "false" + repeat_every: + description: "Accepted values (DAY,WEEK,MONTH,3MONTHS,YEAR)" + type: string + example: DAY + start_from: + description: "Timestamp when we should start the scheduler, default is today" + type: integer + example: "1652898504" + job: + description: "Job, we can find list of available jobs in Scheduler model" + type: string + example: create_credit_report + date_range: + description: "The string representation of the date range of data to be returned" + type: string + example: last7 + date_key: + description: "The date column to search between." + type: string + example: created_at + start_date: + description: "The start date to search between" + type: string + example: "2022-10-31" + end_date: + description: "The end date to search between" + type: string + example: "2022-10-31" + report_keys: + type: array + items: + description: "Array of Keys to export" + type: string + example: "['name','date']" + type: object + UpdateTaskSchedulerSchema: + properties: + paused: + description: "The scheduler paused state" + type: boolean + example: "false" + repeat_every: + description: "Accepted values (DAY,WEEK,MONTH,3MONTHS,YEAR)" + type: string + example: DAY + start_from: + description: "Timestamp when we should start the scheduler, default is today" + type: integer + example: "1652898504" + job: + description: "Job, we can find list of available jobs in Scheduler model" + type: string + example: create_credit_report + date_range: + description: "The string representation of the date range of data to be returned" + type: string + example: last7 + date_key: + description: "The date column to search between." + type: string + example: created_at + start_date: + description: "The start date to search between" + type: string + example: "2022-10-31" + end_date: + description: "The end date to search between" + type: string + example: "2022-10-31" + type: object + UpdateJobForASchedulerSchema: + properties: + job: + description: "Set action name, action names can be found in Scheduler Model" + type: string + example: create_client_report + type: object + TaskStatus: + properties: + id: + description: "The task status hashed id" + type: string + example: Opnel5aKBz + readOnly: true + name: + description: "The task status name" + type: string + example: Backlog + color: + description: "The task status color - hex value" + type: string + example: "#000000" + task_status_order: + description: "The order of the task status" + type: integer + example: "4" + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + is_deleted: + description: "A boolean flag determining if the task status has been deleted" + type: boolean + example: true + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + archived_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + type: object + TaxRate: + properties: + id: + description: "Thie hashed id of the tax" + type: string + example: Opnel5aKBz + readOnly: true + name: + description: "The tax name" + type: string + example: GST + rate: + description: "The tax rate" + type: number + example: "10" + is_deleted: + description: "Boolean flag determining if the tax has been deleted" + type: boolean + example: true + type: object + Template: + properties: + html: + description: "The template HTML" + type: string + example: "" + type: object - ClientSettings: - required: - - currency_id - properties: - currency_id: - description: 'The default currency id' - type: string - example: true - timezone_id: - description: 'The timezone id' - type: string - example: '15' - date_format_id: - description: 'The date format id' - type: string - example: '15' - military_time: - description: 'Toggles 12/24 hour time' - type: boolean - example: true - language_id: - description: 'The language id' - type: string - example: '1' - show_currency_code: - description: 'Toggles whether the currency symbol or code is shown' - type: boolean - example: true - payment_terms: - description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' - type: integer - example: '1' - company_gateway_ids: - description: 'A commad separate list of available gateways' - type: string - example: '1,2,3,4' - custom_value1: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value2: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value3: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value4: - description: 'A Custom Label' - type: string - example: 'Custom Label' - default_task_rate: - description: 'The default task rate' - type: number - format: float - example: '10.00' - send_reminders: - description: 'Toggles whether reminders are sent' - type: boolean - example: true - enable_client_portal_tasks: - description: 'Show/hide the tasks panel in the client portal' - type: boolean - example: true - email_style: - description: 'options include plain,light,dark,custom' - type: string - example: light - reply_to_email: - description: 'The reply to email address' - type: string - example: email@gmail.com - bcc_email: - description: 'A comma separate list of BCC emails' - type: string - example: 'email@gmail.com, contact@gmail.com' - pdf_email_attachment: - description: 'Toggles whether to attach PDF as attachment' - type: boolean - example: true - ubl_email_attachment: - description: 'Toggles whether to attach UBL as attachment' - type: boolean - example: true - email_style_custom: - description: 'The custom template' - type: string - example: '' - counter_number_applied: - description: 'enum when the invoice number counter is set, ie when_saved, when_sent, when_paid' - type: string - example: when_sent - quote_number_applied: - description: 'enum when the quote number counter is set, ie when_saved, when_sent' - type: string - example: when_sent - custom_message_dashboard: - description: 'A custom message which is displayed on the dashboard' - type: string - example: 'Please pay invoices immediately' - custom_message_unpaid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a unpaid invoice.' - type: string - example: 'Please pay invoices immediately' - custom_message_paid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a paid invoice.' - type: string - example: 'Thanks for paying this invoice!' - custom_message_unapproved_quote: - description: 'A custom message which is displayed in the client portal when a client is viewing a unapproved quote.' - type: string - example: 'Please approve quote' - lock_invoices: - description: 'Toggles whether invoices are locked once sent and cannot be modified further' - type: boolean - example: true - auto_archive_invoice: - description: 'Toggles whether a invoice is archived immediately following payment' - type: boolean - example: true - auto_archive_quote: - description: 'Toggles whether a quote is archived after being converted to a invoice' - type: boolean - example: true - auto_convert_quote: - description: 'Toggles whether a quote is converted to a invoice when approved' - type: boolean - example: true - inclusive_taxes: - description: 'Boolean flag determining whether inclusive or exclusive taxes are used' - type: boolean - example: true - task_number_pattern: - description: 'Allows customisation of the task number pattern' - type: string - example: '{$year}-{$counter}' - task_number_counter: - description: 'The incrementing counter for tasks' - type: integer - example: '1' - reminder_send_time: - description: 'Time from UTC +0 when the email will be sent to the client' - type: integer - example: '32400' - expense_number_pattern: - description: 'Allows customisation of the expense number pattern' - type: string - example: '{$year}-{$counter}' - expense_number_counter: - description: 'The incrementing counter for expenses' - type: integer - example: '1' - vendor_number_pattern: - description: 'Allows customisation of the vendor number pattern' - type: string - example: '{$year}-{$counter}' - vendor_number_counter: - description: 'The incrementing counter for vendors' - type: integer - example: '1' - ticket_number_pattern: - description: 'Allows customisation of the ticket number pattern' - type: string - example: '{$year}-{$counter}' - ticket_number_counter: - description: 'The incrementing counter for tickets' - type: integer - example: '1' - payment_number_pattern: - description: 'Allows customisation of the payment number pattern' - type: string - example: '{$year}-{$counter}' - payment_number_counter: - description: 'The incrementing counter for payments' - type: integer - example: '1' - invoice_number_pattern: - description: 'Allows customisation of the invoice number pattern' - type: string - example: '{$year}-{$counter}' - invoice_number_counter: - description: 'The incrementing counter for invoices' - type: integer - example: '1' - quote_number_pattern: - description: 'Allows customisation of the quote number pattern' - type: string - example: '{$year}-{$counter}' - quote_number_counter: - description: 'The incrementing counter for quotes' - type: integer - example: '1' - client_number_pattern: - description: 'Allows customisation of the client number pattern' - type: string - example: '{$year}-{$counter}' - client_number_counter: - description: 'The incrementing counter for clients' - type: integer - example: '1' - credit_number_pattern: - description: 'Allows customisation of the credit number pattern' - type: string - example: '{$year}-{$counter}' - credit_number_counter: - description: 'The incrementing counter for credits' - type: integer - example: '1' - recurring_invoice_number_prefix: - description: 'This string is prepended to the recurring invoice number' - type: string - example: R - reset_counter_frequency_id: - description: 'CONSTANT which is used to apply the frequency which the counters are reset' - type: integer - example: '1' - reset_counter_date: - description: 'The explicit date which is used to reset counters' - type: string - example: '2019-01-01' - counter_padding: - description: 'Pads the counter with leading zeros' - type: integer - example: '1' - shared_invoice_quote_counter: - description: 'Flags whether to share the counter for invoices and quotes' - type: boolean - example: true - update_products: - description: 'Determines if client fields are updated from third party APIs' - type: boolean - example: true - convert_products: - description: '' - type: boolean - example: true - fill_products: - description: 'Automatically fill products based on product_key' - type: boolean - example: true - invoice_terms: - description: 'The default invoice terms' - type: string - example: 'Invoice Terms are...' - quote_terms: - description: 'The default quote terms' - type: string - example: 'Quote Terms are...' - invoice_taxes: - description: 'Taxes can be applied to the invoice' - type: number - example: '1' - invoice_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' - quote_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' - invoice_footer: - description: 'The default invoice footer' - type: string - example: '1' - invoice_labels: - description: 'JSON string of invoice labels' - type: string - example: '1' - tax_rate1: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name1: - description: 'The tax name' - type: string - example: GST - tax_rate2: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name2: - description: 'The tax name' - type: string - example: GST - tax_rate3: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name3: - description: 'The tax name' - type: string - example: GST - payment_type_id: - description: 'The default payment type id' - type: string - example: '1' - custom_fields: - description: 'JSON string of custom fields' - type: string - example: '{}' - email_footer: - description: 'The default email footer' - type: string - example: 'A default email footer' - email_sending_method: - description: 'The email driver to use to send email, options include default, gmail' - type: string - example: default - gmail_sending_user_id: - description: 'The hashed_id of the user account to send email from' - type: string - example: F76sd34D - email_subject_invoice: - description: '' - type: string - example: 'Your Invoice Subject' - email_subject_quote: - description: '' - type: string - example: 'Your Quote Subject' - email_subject_payment: - description: '' - type: string - example: 'Your Payment Subject' - email_template_invoice: - description: 'The full template for invoice emails' - type: string - example: '' - email_template_quote: - description: 'The full template for quote emails' - type: string - example: '' - email_template_payment: - description: 'The full template for payment emails' - type: string - example: '' - email_subject_reminder1: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder2: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder3: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder_endless: - description: 'Email subject for endless reminders' - type: string - example: '' - email_template_reminder1: - description: 'The full template for Reminder 1' - type: string - example: '' - email_template_reminder2: - description: 'The full template for Reminder 2' - type: string - example: '' - email_template_reminder3: - description: 'The full template for Reminder 3' - type: string - example: '' - email_template_reminder_endless: - description: 'The full template for enless reminders' - type: string - example: '' - enable_portal_password: - description: 'Toggles whether a password is required to log into the client portal' - type: boolean - example: true - show_accept_invoice_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true - show_accept_quote_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true - require_invoice_signature: - description: 'Toggles whether a invoice signature is required' - type: boolean - example: true - require_quote_signature: - description: 'Toggles whether a quote signature is required' - type: boolean - example: true - name: - description: 'The company name' - type: string - example: 'Acme Co' - company_logo: - description: 'The company logo file' - type: object - example: logo.png - website: - description: 'The company website URL' - type: string - example: www.acme.com - address1: - description: 'The company address line 1' - type: string - example: 'Suite 888' - address2: - description: 'The company address line 2' - type: string - example: '5 Jimbo Way' - city: - description: 'The company city' - type: string - example: Sydney - state: - description: 'The company state' - type: string - example: Florisa - postal_code: - description: 'The company zip/postal code' - type: string - example: '90210' - phone: - description: 'The company phone' - type: string - example: 555-213-3948 - email: - description: 'The company email' - type: string - example: joe@acme.co - country_id: - description: 'The country ID' - type: string - example: '1' - vat_number: - description: 'The company VAT/TAX ID number' - type: string - example: '32 120 377 720' - page_size: - description: 'The default page size' - type: string - example: A4 - font_size: - description: 'The font size' - type: number - example: '9' - primary_font: - description: 'The primary font' - type: string - example: roboto - secondary_font: - description: 'The secondary font' - type: string - example: roboto - hide_paid_to_date: - description: 'Flags whether to hide the paid to date field' - type: boolean - example: false - embed_documents: - description: 'Toggled whether to embed documents in the PDF' - type: boolean - example: false - all_pages_header: - description: 'The header for the PDF' - type: boolean - example: false - all_pages_footer: - description: 'The footer for the PDF' - type: boolean - example: false - document_email_attachment: - description: 'Toggles whether to attach documents in the email' - type: boolean - example: false - enable_client_portal_password: - description: 'Toggles password protection of the client portal' - type: boolean - example: false - enable_email_markup: - description: 'Toggles the use of markdown in emails' - type: boolean - example: false - enable_client_portal_dashboard: - description: 'Toggles whether the client dashboard is shown in the client portal' - type: boolean - example: false - enable_client_portal: - description: 'Toggles whether the entire client portal is displayed to the client, or only the context' - type: boolean - example: false - email_template_statement: - description: 'The body of the email for statements' - type: string - example: 'template matter' - email_subject_statement: - description: 'The subject of the email for statements' - type: string - example: 'subject matter' - signature_on_pdf: - description: 'Toggles whether the signature (if available) is displayed on the PDF' - type: boolean - example: false - quote_footer: - description: 'The default quote footer' - type: string - example: 'the quote footer' - email_subject_custom1: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 1' - email_subject_custom2: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 2' - email_subject_custom3: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 3' - email_template_custom1: - description: 'Custom reminder template body' - type: string - example: '' - email_template_custom2: - description: 'Custom reminder template body' - type: string - example: '' - email_template_custom3: - description: 'Custom reminder template body' - type: string - example: '' - enable_reminder1: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder2: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder3: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - num_days_reminder1: - description: 'The Reminder interval' - type: number - example: '9' - num_days_reminder2: - description: 'The Reminder interval' - type: number - example: '9' - num_days_reminder3: - description: 'The Reminder interval' - type: number - example: '9' - schedule_reminder1: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder2: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder3: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - late_fee_amount1: - description: 'The late fee amount for reminder 1' - type: number - example: 10 - late_fee_amount2: - description: 'The late fee amount for reminder 2' - type: number - example: 20 - late_fee_amount3: - description: 'The late fee amount for reminder 2' - type: number - example: 100 - endless_reminder_frequency_id: - description: 'The frequency id of the endless reminder' - type: string - example: '1' - client_online_payment_notification: - description: 'Determines if a client should receive the notification for a online payment' - type: boolean - example: false - client_manual_payment_notification: - description: 'Determines if a client should receive the notification for a manually entered payment' - type: boolean - example: false - enable_e_invoice: - description: 'Determines if e-invoicing is enabled' - type: boolean - example: false - default_expense_payment_type_id: - description: 'The default payment type for expenses' - type: string - example: '0' - e_invoice_type: - description: 'The e-invoice type' - type: string - example: 'EN16931' - mailgun_endpoint: - description: 'The mailgun endpoint - used to determine whether US or EU endpoints are used' - type: string - example: 'api.mailgun.net or api.eu.mailgun.net' - client_initiated_payments: - description: 'Determines if clients can initiate payments directly from the client portal' - type: boolean - example: false - client_initiated_payments_minimum: - description: 'The minimum amount a client can pay' - type: number - example: 10 - sync_invoice_quote_columns: - description: 'Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns' - type: boolean - example: false - show_task_item_description: - description: 'Determines if the task item description is shown on the invoice' - type: boolean - example: false - allow_billable_task_items: - description: 'Determines if task items can be marked as billable' - type: boolean - example: false - accept_client_input_quote_approval: - description: 'Determines if clients can approve quotes and also pass through a PO Number reference' - type: boolean - example: false - custom_sending_email: - description: 'When using Mailgun or Postmark, the FROM email address can be customized using this setting.' - type: string - example: 'bob@gmail.com' - show_paid_stamp: - description: 'Determines if the PAID stamp is shown on the invoice' - type: boolean - example: false - show_shipping_address: - description: 'Determines if the shipping address is shown on the invoice' - type: boolean - example: false - company_logo_size: - description: 'The size of the company logo on the PDF - percentage value between 0 and 100' - type: number - example: 100 - show_email_footer: - description: 'Determines if the email footer is shown on emails' - type: boolean - example: false - email_alignment: - description: 'The alignment of the email body text, options include left / center / right' - type: string - example: 'left' - auto_bill_standard_invoices: - description: 'Determines if standard invoices are automatically billed when they are created or due' - type: boolean - example: false - postmark_secret: - description: 'The Postmark secret API key' - type: string - example: '123456' - mailgun_secret: - description: 'The Mailgun secret API key' - type: string - example: '123456' - mailgun_domain: - description: 'The Mailgun domain' - type: string - example: 'sandbox123456.mailgun.org' - send_email_on_mark_paid: - description: 'Determines if an email is sent when an invoice is marked as paid' - type: boolean - example: false - vendor_portal_enable_uploads: - description: 'Determines if vendors can upload files to the portal' - type: boolean - example: false - besr_id: - description: 'The BESR ID' - type: string - example: '123456' - qr_iban: - description: 'The IBAN for the QR code' - type: string - example: 'CH123456' - email_subject_purchase_order: - description: 'The email subject for purchase orders' - type: string - example: 'Purchase Order' - email_template_purchase_order: - description: 'The email template for purchase orders' - type: string - example: 'Please see attached your purchase order.' - require_purchase_order_signature: - description: 'Determines if a signature is required on purchase orders' - type: boolean - example: false - purchase_order_public_notes: - description: 'The public notes for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_terms: - description: 'The terms for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_footer: - description: 'The footer for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_design_id: - description: 'The design id for purchase orders' - type: string - example: 'hd677df' - purchase_order_number_pattern: - description: 'The pattern for purchase order numbers' - type: string - example: 'PO-000000' - purchase_order_number_counter: - description: 'The counter for purchase order numbers' - type: number - example: 1 - page_numbering_alignment: - description: 'The alignment for page numbering: options include left / center / right' - type: string - example: 'left' - page_numbering: - description: 'Determines if page numbering is enabled on Document PDFs' - type: boolean - example: false - auto_archive_invoice_cancelled: - description: 'Determines if invoices are automatically archived when they are cancelled' - type: boolean - example: false - email_from_name: - description: 'The FROM name for emails when using Custom emailers' - type: string - example: 'Bob Smith' - show_all_tasks_client_portal: - description: 'Determines if all tasks are shown on the client portal' - type: boolean - example: false - entity_send_time: - description: 'The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24' - type: integer - example: 9 - shared_invoice_credit_counter: - description: 'Determines if the invoice and credit counter are shared' - type: boolean - example: false - reply_to_name: - description: 'The reply to name for emails' - type: string - example: 'Bob Smith' - hide_empty_columns_on_pdf: - description: 'Determines if empty columns are hidden on PDFs' - type: boolean - example: false - enable_reminder_endless: - description: 'Determines if endless reminders are enabled' - type: boolean - example: false - use_credits_payment: - description: 'Determines if credits can be used as a payment method' - type: boolean - example: false - recurring_invoice_number_pattern: - description: 'The pattern for recurring invoice numbers' - type: string - example: 'R-000000' - recurring_invoice_number_counter: - description: 'The counter for recurring invoice numbers' - type: number - example: 1 - client_portal_under_payment_minimum: - description: 'The minimum payment payment' - type: number - example: 10 - auto_bill_date: - description: 'Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))' - type: string - example: 'on_send_date' - primary_color: - description: 'The primary color for the client portal / document highlights' - type: string - example: '#ffffff' - secondary_color: - description: 'The secondary color for the client portal / document highlights' - type: string - example: '#ffffff' - client_portal_allow_under_payment: - description: 'Determines if clients can pay invoices under the invoice amount due' - type: boolean - example: false - client_portal_allow_over_payment: - description: 'Determines if clients can pay invoices over the invoice amount' - type: boolean - example: false - auto_bill: - description: 'Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing' - type: string - example: 'off' - client_portal_terms: - description: 'The terms which are displayed on the client portal' - type: string - example: 'Please see attached your invoice.' - client_portal_privacy_policy: - description: 'The privacy policy which is displayed on the client portal' - type: string - example: 'These are the terms of use for using the client portal.' - client_can_register: - description: 'Determines if clients can register on the client portal' - type: boolean - example: false - portal_design_id: - description: 'The design id for the client portal' - type: string - example: 'hd677df' - late_fee_endless_percent: - description: 'The late fee percentage for endless late fees' - type: number - example: 10 - late_fee_endless_amount: - description: 'The late fee amount for endless late fees' - type: number - example: 10 - auto_email_invoice: - description: 'Determines if invoices are automatically emailed when they are created' - type: boolean - example: false - email_signature: - description: 'The email signature for emails' - type: string - example: 'Bob Smith' - type: object - Product: - type: object - properties: - id: - type: string - description: 'The hashed product ID.' - example: eP01N - readOnly: true - company_id: - type: string - description: 'The hashed ID of the company that owns this product.' - example: eP01N - readOnly: true - user_id: - type: string - description: 'The hashed ID of the user that created this product.' - example: n30m4 - readOnly: true - assigned_user_id: - type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - project_id: - type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - vendor_id: - type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - custom_value1: - type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - custom_value2: - type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - custom_value3: - type: string - description: 'Custom value field 3.' - example: 'Custom value 3' - custom_value4: - type: string - description: 'Custom value field 4.' - example: 'Custom value 4' - product_key: - type: string - description: 'The product key.' - example: '1234' - notes: - type: string - description: 'Notes about the product.' - example: 'These are some notes about the product.' - cost: - type: number - format: double - description: 'The cost of the product. (Your purchase price for this product)' - example: 10.0 - price: - type: number - format: double - description: 'The price of the product that you are charging.' - example: 20.0 - quantity: - type: number - format: double - description: 'The quantity of the product. (used as a default)' - example: 5.0 - tax_name1: - type: string - description: 'The name of tax 1.' - example: 'Tax 1' - tax_rate1: - type: number - format: double - description: 'The rate of tax 1.' - example: 10.0 - tax_name2: - type: string - description: 'The name of tax 2.' - example: 'Tax 2' - tax_rate2: - type: number - format: double - description: 'The rate of tax 2.' - example: 5.0 - tax_name3: - type: string - description: 'The name of tax 3.' - example: 'Tax 3' - tax_rate3: - type: number - format: double - description: 'The rate of tax 3.' - example: 0.0 - archived_at: - type: integer - format: timestamp - description: 'The timestamp when the product was archived.' - example: '2022-03-18T15:00:00Z' - readOnly: true - created_at: - type: integer - format: timestamp - description: 'The timestamp when the product was created.' - example: '2022-03-18T15:00:00Z' - readOnly: true - updated_at: - description: Timestamp - type: integer - format: timestamp - example: '2022-03-18T12:34:56.789Z' - readOnly: true - is_deleted: - type: boolean - description: 'Boolean flag determining if the product has been deleted' - example: false - readOnly: true - in_stock_quantity: - type: integer - format: int32 - description: The quantity of the product that is currently in stock - default: 0 - stock_notification: - type: boolean - description: Indicates whether stock notifications are enabled for this product - default: true - stock_notification_threshold: - type: integer - format: int32 - description: The minimum quantity threshold for which stock notifications will be triggered - default: 0 - max_quantity: - type: integer - format: int32 - description: The maximum quantity that can be ordered for this product - product_image: - type: string - description: The URL of the product image - format: uri-reference - tax_id: - type: string - default: '1' - description: | - The tax category id for this product.' + AuthenticationError: + type: object + properties: + message: + description: "These credentials do not match our records / Invalid Token" + type: string + example: "These credentials do not match our records / Invalid Token" + ValidationError: + properties: + message: + description: "The error message" + type: string + example: "The given data was invalid." + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + AuthorizationError: + properties: + message: + description: "Insufficient permissions for this resource." + type: string + example: "Insufficient permissions for this resource." + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + RateLimiterError: + properties: + message: + description: "Rate limit exceeded." + type: string + example: "Rate limit exceeded." + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + InvalidInputError: + properties: + message: + description: "Invalid input" + type: string + example: "Invalid input" + errors: + properties: + value: + type: array + items: + type: string + type: object + type: object + Webhook: + properties: + id: + description: "The subscription hashed id" + type: string + example: AS3df3A + event_id: + description: "The subscription event id" + type: string + example: AS3df3A + target_url: + description: "The api endpoint" + type: string + example: AS3df3A + format: + description: "JSON or UBL" + type: string + example: JSON + type: object + Credit: + properties: + id: + description: "The unique hashed ID of the credit" + type: string + example: Opnel5aKBz + user_id: + description: "The unique hashed ID of the user associated with the credit" + type: string + example: 1a2b3c4d5e + assigned_user_id: + description: "The unique hashed ID of the assigned user responsible for the credit" + type: string + example: 6f7g8h9i0j + company_id: + description: "The unique hashed ID of the company associated with the credit" + type: string + example: k1l2m3n4o5 + client_id: + description: "The unique hashed ID of the client associated with the credit" + type: string + example: p1q2r3s4t5 + status_id: + description: "The ID representing the current status of the credit" + type: string + example: 3 + invoice_id: + description: "The unique hashed ID of the linked invoice to which the credit is applied" + type: string + example: u1v2w3x4y5 + number: + description: "The unique alphanumeric credit number per company" + type: string + example: QUOTE_101 + po_number: + description: "The purchase order number referred to by the credit" + type: string + example: PO_12345 + terms: + description: "The terms associated with the credit" + type: string + example: "Net 30" + public_notes: + description: "Public notes for the credit" + type: string + example: "Thank you for your business." + private_notes: + description: "Private notes for internal use, not visible to the client" + type: string + example: "Client is requesting a discount." + footer: + description: "The footer text for the credit" + type: string + example: "Footer text goes here." + custom_value1: + description: "Custom value 1 for additional credit information" + type: string + example: "Custom data 1" + custom_value2: + description: "Custom value 2 for additional credit information" + type: string + example: "Custom data 2" + custom_value3: + description: "Custom value 3 for additional credit information" + type: string + example: "Custom data 3" + custom_value4: + description: "Custom value 4 for additional credit information" + type: string + example: "Custom data 4" + tax_name1: + description: "The name of the first tax applied to the credit" + type: string + example: "VAT" + tax_name2: + description: "The name of the second tax applied to the credit" + type: string + example: "GST" + tax_rate1: + description: "The rate of the first tax applied to the credit" + type: number + format: float + example: 10.00 + tax_rate2: + description: "The rate of the second tax applied to the credit" + type: number + format: float + example: 5.00 + tax_name3: + description: "The name of the third tax applied to the credit" + type: string + example: "PST" + tax_rate3: + description: "The rate of the third tax applied to the credit" + type: number + format: float + example: 8.00 + total_taxes: + description: "The total amount of taxes for the credit" + type: number + format: float + example: 23.00 + line_items: + type: array + description: "An array of objects which define the line items of the credit" + items: + $ref: "#/components/schemas/InvoiceItem" + amount: + description: "The total amount of the credit" + type: number + format: float + example: 100.00 + balance: + description: "The outstanding balance of the credit" + type: number + format: float + example: 50.00 + paid_to_date: + description: "The total amount paid to date for the credit" + type: number + format: float + example: 50.00 + discount: + description: "The discount applied to the credit" + type: number + format: float + example: 10.00 + partial: + description: "The partial amount applied to the credit" + type: number + format: float + example: 20.00 + is_amount_discount: + description: "Indicates whether the discount applied is a fixed amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Indicates whether the credit has been deleted" + type: boolean + example: false + uses_inclusive_taxes: + description: "Indicates whether the tax rates applied to the credit are inclusive or exclusive" + type: boolean + example: true + date: + description: "The date the credit was issued" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The date the credit was last sent out" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The next scheduled date for sending a credit reminder" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the partial amount of the credit" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date for the total amount of the credit" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: "The timestamp of the last time the credit was viewed" + type: number + format: integer + example: 1434342123 + updated_at: + description: "The timestamp of the last time the credit was updated" + type: number + format: integer + example: 1434342123 + archived_at: + description: "The timestamp of the last time the credit was archived" + type: number + format: integer + example: 1434342123 + custom_surcharge1: + description: "First custom surcharge amount" + type: number + format: float + example: 10.00 + custom_surcharge2: + description: "Second Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge3: + description: "Third Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge4: + description: "Fourth Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge_tax1: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax2: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax3: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax4: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + type: object - The following constants are available (default = '1') - - ``` - PRODUCT_TYPE_PHYSICAL = '1' - PRODUCT_TYPE_SERVICE = '2' - PRODUCT_TYPE_DIGITAL = '3' - PRODUCT_TYPE_SHIPPING = '4' - PRODUCT_TYPE_EXEMPT = '5' - PRODUCT_TYPE_REDUCED_TAX = '6' - PRODUCT_TYPE_OVERRIDE_TAX = '7' - PRODUCT_TYPE_ZERO_RATED = '8' - PRODUCT_TYPE_REVERSE_TAX = '9' - ``` - example: '1' + GenericBulkAction: + properties: + action: + type: string + example: archive + description: "The action to perform ie. archive / restore / delete" + ids: + type: array + items: + format: string + type: string + example: 2J234DFA,D2J234DFA,D2J234DFA + description: string array of client hashed ids + type: object + ProductRequest: + type: object + properties: + id: + type: string + description: "The hashed product ID." + example: eP01N + readOnly: true + assigned_user_id: + type: string + description: "The hashed ID of the user assigned to this product." + example: pR0j3 + required: false + project_id: + type: string + description: "The hashed ID of the project that this product is associated with." + example: pR0j3 + required: false + vendor_id: + type: string + description: "The hashed ID of the vendor that this product is associated with." + example: pR0j3 + required: false + custom_value1: + type: string + description: "Custom value field 1." + example: "Custom value 1" + required: false + custom_value2: + type: string + description: "Custom value field 2." + example: "Custom value 2" + required: false + custom_value3: + type: string + description: "Custom value field 3." + example: "Custom value 3" + required: false + custom_value4: + type: string + description: "Custom value field 4." + example: "Custom value 4" + required: false + product_key: + type: string + description: "The product key." + example: "1234" + required: false + notes: + type: string + description: "Notes about the product." + example: "These are some notes about the product." + required: false + cost: + type: number + format: double + description: "The cost of the product." + example: 10.0 + required: false + price: + type: number + format: double + description: "The price of the product." + example: 20.0 + required: false + quantity: + type: number + format: double + description: "The quantity of the product." + example: 5.0 + required: false + default: 1 + tax_name1: + type: string + description: "The name of tax 1." + example: "Tax 1" + required: false + tax_rate1: + type: number + format: double + description: "The rate of tax 1." + example: 10.0 + required: false + tax_name2: + type: string + description: "The name of tax 2." + example: "Tax 2" + required: false + tax_rate2: + type: number + format: double + description: "The rate of tax 2." + example: 5.0 + required: false + tax_name3: + type: string + description: "The name of tax 3." + example: "Tax 3" + required: false + tax_rate3: + type: number + format: double + description: "The rate of tax 3." + example: 0.0 + required: false + in_stock_quantity: + type: integer + format: int32 + description: | + The quantity of the product that is currently in stock. - ClientContactRequest: - properties: - id: - description: 'The hashed if of the contact' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' - type: string - example: John - last_name: - description: 'The last name of the contact' - type: string - example: Doe - phone: - description: 'The phone number of the contact' - type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' - type: string - example: '' - custom_value2: - description: 'A Custom field value' - type: string - example: '' - custom_value3: - description: 'A Custom field value' - type: string - example: '' - custom_value4: - description: 'A Custom field value' - type: string - example: '' - email: - description: 'The email of the contact' - type: string - example: '' - password: - description: 'The hashed password of the contact' - type: string - example: '*****' - send_email: - description: 'Boolean value determines is this contact should receive emails' - type: boolean - example: true - type: object - ClientRequest: - required: - - contacts - - country_id - properties: - id: - description: 'The unique identifier of the client' - type: string - example: Opnel5aKBz - readOnly: true - contacts: - type: array - description: 'A list of contacts associated with the client' - items: - $ref: '#/components/schemas/ClientContactRequest' - name: - description: 'The name of the client company or organization' - type: string - example: "Jim's Housekeeping" - website: - description: 'The website URL of the client company or organization' - type: string - example: 'https://www.jims-housekeeping.com' - private_notes: - description: 'Notes that are only visible to the user who created the client' - type: string - example: 'Client prefers email communication over phone calls' - industry_id: - description: 'The unique identifier of the industry the client operates in' - type: number - example: '5' - size_id: - description: 'The unique identifier for the size category of the client company or organization' - type: number - example: '2' - address1: - description: "First line of the client's address" - type: string - example: '123 Main St' - address2: - description: "Second line of the client's address, if needed" - type: string - example: 'Apt 4B' - city: - description: 'The city the client is located in' - type: string - example: 'Beverly Hills' - state: - description: 'The state, province, or locality the client is located in' - type: string - example: 'California' - postal_code: - description: 'The postal code or ZIP code of the client' - type: string - example: '90210' - phone: - description: "The client's phone number" - type: string - example: '555-3434-3434' - country_id: - description: "The unique identifier of the client's country" - type: number - format: integer - example: '1' - custom_value1: - description: 'A custom field for storing additional information' - type: string - example: 'Preferred contact: Email' - custom_value2: - description: 'A custom field for storing additional information' - type: string - example: 'Account manager: John Doe' - custom_value3: - description: 'A custom field for storing additional information' - type: string - example: 'VIP client: Yes' - custom_value4: - description: 'A custom field for storing additional information' - type: string - example: 'Annual contract value: $50,000' - vat_number: - description: "The client's VAT (Value Added Tax) number, if applicable" - type: string - example: 'VAT123456' - id_number: - description: 'A unique identification number for the client, such as a tax ID or business registration number' - type: string - number: - description: 'A system-assigned unique number for the client, typically used for invoicing purposes' - type: string - example: 'CL-0001' - shipping_address1: - description: "First line of the client's shipping address" - type: string - example: '5 Wallaby Way' - shipping_address2: - description: "Second line of the client's shipping address, if needed" - type: string - example: 'Suite 5' - shipping_city: - description: "The city of the client's shipping address" - type: string - example: 'Perth' - shipping_state: - description: "The state, province, or locality of the client's shipping address" - type: string - example: 'Western Australia' - shipping_postal_code: - description: "The postal code or ZIP code of the client's shipping address" - type: string - example: '6110' - shipping_country_id: - description: "The unique identifier of the country for the client's shipping address" - type: number - format: integer - example: '4' - is_deleted: - description: 'A boolean value indicating whether the client has been deleted or not' - type: boolean - example: false - readOnly: true - group_settings_id: - description: 'The group settings assigned to the client' - type: string - example: Opnel5aKBz - routing_id: - description: 'The routing address id for e-invoicing for this client' - type: string - example: Opnel5aKBz3489-dfkiu-2239-sdsd - is_tax_exempt: - description: 'Flag which defines if the client is exempt from taxes' - type: boolean - example: false - has_valid_vat_number: - description: 'Flag which defines if the client has a valid VAT number' - type: boolean - example: false - readOnly: true - classification: - description: 'The classification of the client' - type: string - example: 'individual' - settings: - $ref: '#/components/schemas/ClientSettings' - type: object - Error: - properties: - message: - description: 'Something terrible went wrong' - type: string - example: 'Unexpected error' - code: - description: 'The HTTP error code, ie 5xx 4xx' - type: integer - example: '500' - type: object - BTRules: - properties: - data_key: - description: 'The key to search' - type: string - example: 'description,amount' - operator: - description: 'The operator flag of the search' - type: string - example: '>' - value: - description: 'The value to search for' - type: string - example: bob - type: object - CompanySettings: - required: - - currency_id - properties: - currency_id: - description: 'The default currency id' - type: string - example: true - timezone_id: - description: 'The timezone id' - type: string - example: '15' - date_format_id: - description: 'The date format id' - type: string - example: '15' - military_time: - description: 'Toggles 12/24 hour time' - type: boolean - example: true - language_id: - description: 'The language id' - type: string - example: '1' - show_currency_code: - description: 'Toggles whether the currency symbol or code is shown' - type: boolean - example: true - payment_terms: - description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' - type: integer - example: '1' - company_gateway_ids: - description: 'A commad separate list of available gateways' - type: string - example: '1,2,3,4' - custom_value1: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value2: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value3: - description: 'A Custom Label' - type: string - example: 'Custom Label' - custom_value4: - description: 'A Custom Label' - type: string - example: 'Custom Label' - default_task_rate: - description: 'The default task rate' - type: number - format: float - example: '10.00' - send_reminders: - description: 'Toggles whether reminders are sent' - type: boolean - example: true - enable_client_portal_tasks: - description: 'Show/hide the tasks panel in the client portal' - type: boolean - example: true - email_style: - description: 'options include plain,light,dark,custom' - type: string - example: light - reply_to_email: - description: 'The reply to email address' - type: string - example: email@gmail.com - bcc_email: - description: 'A comma separate list of BCC emails' - type: string - example: 'email@gmail.com, contact@gmail.com' - pdf_email_attachment: - description: 'Toggles whether to attach PDF as attachment' - type: boolean - example: true - ubl_email_attachment: - description: 'Toggles whether to attach UBL as attachment' - type: boolean - example: true - email_style_custom: - description: 'The custom template' - type: string - example: '' - counter_number_applied: - description: 'enum when the invoice number counter is set, ie when_saved, when_sent, when_paid' - type: string - example: when_sent - quote_number_applied: - description: 'enum when the quote number counter is set, ie when_saved, when_sent' - type: string - example: when_sent - custom_message_dashboard: - description: 'A custom message which is displayed on the dashboard' - type: string - example: 'Please pay invoices immediately' - custom_message_unpaid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a unpaid invoice.' - type: string - example: 'Please pay invoices immediately' - custom_message_paid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a paid invoice.' - type: string - example: 'Thanks for paying this invoice!' - custom_message_unapproved_quote: - description: 'A custom message which is displayed in the client portal when a client is viewing a unapproved quote.' - type: string - example: 'Please approve quote' - lock_invoices: - description: 'Toggles whether invoices are locked once sent and cannot be modified further' - type: boolean - example: true - auto_archive_invoice: - description: 'Toggles whether a invoice is archived immediately following payment' - type: boolean - example: true - auto_archive_quote: - description: 'Toggles whether a quote is archived after being converted to a invoice' - type: boolean - example: true - auto_convert_quote: - description: 'Toggles whether a quote is converted to a invoice when approved' - type: boolean - example: true - inclusive_taxes: - description: 'Boolean flag determining whether inclusive or exclusive taxes are used' - type: boolean - example: true - translations: - description: 'JSON payload of customized translations' - type: object - example: '' - task_number_pattern: - description: 'Allows customisation of the task number pattern' - type: string - example: '{$year}-{$counter}' - task_number_counter: - description: 'The incrementing counter for tasks' - type: integer - example: '1' - reminder_send_time: - description: 'Time from UTC +0 when the email will be sent to the client' - type: integer - example: '32400' - expense_number_pattern: - description: 'Allows customisation of the expense number pattern' - type: string - example: '{$year}-{$counter}' - expense_number_counter: - description: 'The incrementing counter for expenses' - type: integer - example: '1' - vendor_number_pattern: - description: 'Allows customisation of the vendor number pattern' - type: string - example: '{$year}-{$counter}' - vendor_number_counter: - description: 'The incrementing counter for vendors' - type: integer - example: '1' - ticket_number_pattern: - description: 'Allows customisation of the ticket number pattern' - type: string - example: '{$year}-{$counter}' - ticket_number_counter: - description: 'The incrementing counter for tickets' - type: integer - example: '1' - payment_number_pattern: - description: 'Allows customisation of the payment number pattern' - type: string - example: '{$year}-{$counter}' - payment_number_counter: - description: 'The incrementing counter for payments' - type: integer - example: '1' - invoice_number_pattern: - description: 'Allows customisation of the invoice number pattern' - type: string - example: '{$year}-{$counter}' - invoice_number_counter: - description: 'The incrementing counter for invoices' - type: integer - example: '1' - quote_number_pattern: - description: 'Allows customisation of the quote number pattern' - type: string - example: '{$year}-{$counter}' - quote_number_counter: - description: 'The incrementing counter for quotes' - type: integer - example: '1' - client_number_pattern: - description: 'Allows customisation of the client number pattern' - type: string - example: '{$year}-{$counter}' - client_number_counter: - description: 'The incrementing counter for clients' - type: integer - example: '1' - credit_number_pattern: - description: 'Allows customisation of the credit number pattern' - type: string - example: '{$year}-{$counter}' - credit_number_counter: - description: 'The incrementing counter for credits' - type: integer - example: '1' - recurring_invoice_number_prefix: - description: 'This string is prepended to the recurring invoice number' - type: string - example: R - reset_counter_frequency_id: - description: 'CONSTANT which is used to apply the frequency which the counters are reset' - type: integer - example: '1' - reset_counter_date: - description: 'The explicit date which is used to reset counters' - type: string - example: '2019-01-01' - counter_padding: - description: 'Pads the counter with leading zeros' - type: integer - example: '1' - shared_invoice_quote_counter: - description: 'Flags whether to share the counter for invoices and quotes' - type: boolean - example: true - update_products: - description: 'Determines if client fields are updated from third party APIs' - type: boolean - example: true - convert_products: - description: '' - type: boolean - example: true - fill_products: - description: 'Automatically fill products based on product_key' - type: boolean - example: true - invoice_terms: - description: 'The default invoice terms' - type: string - example: 'Invoice Terms are...' - quote_terms: - description: 'The default quote terms' - type: string - example: 'Quote Terms are...' - invoice_taxes: - description: 'Taxes can be applied to the invoice' - type: number - example: '1' - invoice_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' - quote_design_id: - description: 'The default design id (invoice, quote etc)' - type: string - example: '1' - invoice_footer: - description: 'The default invoice footer' - type: string - example: '1' - invoice_labels: - description: 'JSON string of invoice labels' - type: string - example: '1' - tax_rate1: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name1: - description: 'The tax name' - type: string - example: GST - tax_rate2: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name2: - description: 'The tax name' - type: string - example: GST - tax_rate3: - description: 'The tax rate (float)' - type: number - example: '10' - tax_name3: - description: 'The tax name' - type: string - example: GST - payment_type_id: - description: 'The default payment type id' - type: string - example: '1' - custom_fields: - description: 'JSON string of custom fields' - type: string - example: '{}' - email_footer: - description: 'The default email footer' - type: string - example: 'A default email footer' - email_sending_method: - description: 'The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, office365' - type: string - example: default - gmail_sending_user_id: - description: 'The hashed_id of the user account to send email from' - type: string - example: F76sd34D - email_subject_invoice: - description: '' - type: string - example: 'Your Invoice Subject' - email_subject_quote: - description: '' - type: string - example: 'Your Quote Subject' - email_subject_payment: - description: '' - type: string - example: 'Your Payment Subject' - email_template_invoice: - description: 'The full template for invoice emails' - type: string - example: '' - email_template_quote: - description: 'The full template for quote emails' - type: string - example: '' - email_template_payment: - description: 'The full template for payment emails' - type: string - example: '' - email_subject_reminder1: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder2: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder3: - description: 'Email subject for Reminder' - type: string - example: '' - email_subject_reminder_endless: - description: 'Email subject for endless reminders' - type: string - example: '' - email_template_reminder1: - description: 'The full template for Reminder 1' - type: string - example: '' - email_template_reminder2: - description: 'The full template for Reminder 2' - type: string - example: '' - email_template_reminder3: - description: 'The full template for Reminder 3' - type: string - example: '' - email_template_reminder_endless: - description: 'The full template for enless reminders' - type: string - example: '' - enable_portal_password: - description: 'Toggles whether a password is required to log into the client portal' - type: boolean - example: true - show_accept_invoice_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true - show_accept_quote_terms: - description: 'Toggles whether the terms dialogue is shown to the client' - type: boolean - example: true - require_invoice_signature: - description: 'Toggles whether a invoice signature is required' - type: boolean - example: true - require_quote_signature: - description: 'Toggles whether a quote signature is required' - type: boolean - example: true - name: - description: 'The company name' - type: string - example: 'Acme Co' - company_logo: - description: 'The company logo file' - type: object - example: logo.png - website: - description: 'The company website URL' - type: string - example: www.acme.com - address1: - description: 'The company address line 1' - type: string - example: 'Suite 888' - address2: - description: 'The company address line 2' - type: string - example: '5 Jimbo Way' - city: - description: 'The company city' - type: string - example: Sydney - state: - description: 'The company state' - type: string - example: Florisa - postal_code: - description: 'The company zip/postal code' - type: string - example: '90210' - phone: - description: 'The company phone' - type: string - example: 555-213-3948 - email: - description: 'The company email' - type: string - example: joe@acme.co - country_id: - description: 'The country ID' - type: string - example: '1' - vat_number: - description: 'The company VAT/TAX ID number' - type: string - example: '32 120 377 720' - page_size: - description: 'The default page size' - type: string - example: A4 - font_size: - description: 'The font size' - type: number - example: '9' - primary_font: - description: 'The primary font' - type: string - example: roboto - secondary_font: - description: 'The secondary font' - type: string - example: roboto - hide_paid_to_date: - description: 'Flags whether to hide the paid to date field' - type: boolean - example: false - embed_documents: - description: 'Toggled whether to embed documents in the PDF' - type: boolean - example: false - all_pages_header: - description: 'The header for the PDF' - type: boolean - example: false - all_pages_footer: - description: 'The footer for the PDF' - type: boolean - example: false - document_email_attachment: - description: 'Toggles whether to attach documents in the email' - type: boolean - example: false - enable_client_portal_password: - description: 'Toggles password protection of the client portal' - type: boolean - example: false - enable_email_markup: - description: 'Toggles the use of markdown in emails' - type: boolean - example: false - enable_client_portal_dashboard: - description: 'Toggles whether the client dashboard is shown in the client portal' - type: boolean - example: false - enable_client_portal: - description: 'Toggles whether the entire client portal is displayed to the client, or only the context' - type: boolean - example: false - email_template_statement: - description: 'The body of the email for statements' - type: string - example: 'template matter' - email_subject_statement: - description: 'The subject of the email for statements' - type: string - example: 'subject matter' - signature_on_pdf: - description: 'Toggles whether the signature (if available) is displayed on the PDF' - type: boolean - example: false - quote_footer: - description: 'The default quote footer' - type: string - example: 'the quote footer' - email_subject_custom1: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 1' - email_subject_custom2: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 2' - email_subject_custom3: - description: 'Custom reminder template subject' - type: string - example: 'Custom Subject 3' - email_template_custom1: - description: 'Custom reminder template body' - type: string - example: '' - email_template_custom2: - description: 'Custom reminder template body' - type: string - example: '' - email_template_custom3: - description: 'Custom reminder template body' - type: string - example: '' - enable_reminder1: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder2: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder3: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - num_days_reminder1: - description: 'The Reminder interval' - type: number - example: '9' - num_days_reminder2: - description: 'The Reminder interval' - type: number - example: '9' - num_days_reminder3: - description: 'The Reminder interval' - type: number - example: '9' - schedule_reminder1: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder2: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder3: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - late_fee_amount1: - description: 'The late fee amount for reminder 1' - type: number - example: 10 - late_fee_amount2: - description: 'The late fee amount for reminder 2' - type: number - example: 20 - late_fee_amount3: - description: 'The late fee amount for reminder 2' - type: number - example: 100 - endless_reminder_frequency_id: - description: 'The frequency id of the endless reminder' - type: string - example: '1' - client_online_payment_notification: - description: 'Determines if a client should receive the notification for a online payment' - type: boolean - example: false - client_manual_payment_notification: - description: 'Determines if a client should receive the notification for a manually entered payment' - type: boolean - example: false - enable_e_invoice: - description: 'Determines if e-invoicing is enabled' - type: boolean - example: false - default_expense_payment_type_id: - description: 'The default payment type for expenses' - type: string - example: '0' - e_invoice_type: - description: 'The e-invoice type' - type: string - example: 'EN16931' - mailgun_endpoint: - description: 'The mailgun endpoint - used to determine whether US or EU endpoints are used' - type: string - example: 'api.mailgun.net or api.eu.mailgun.net' - client_initiated_payments: - description: 'Determines if clients can initiate payments directly from the client portal' - type: boolean - example: false - client_initiated_payments_minimum: - description: 'The minimum amount a client can pay' - type: number - example: 10 - sync_invoice_quote_columns: - description: 'Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns' - type: boolean - example: false - show_task_item_description: - description: 'Determines if the task item description is shown on the invoice' - type: boolean - example: false - allow_billable_task_items: - description: 'Determines if task items can be marked as billable' - type: boolean - example: false - accept_client_input_quote_approval: - description: 'Determines if clients can approve quotes and also pass through a PO Number reference' - type: boolean - example: false - custom_sending_email: - description: 'When using Mailgun or Postmark, the FROM email address can be customized using this setting.' - type: string - example: 'bob@gmail.com' - show_paid_stamp: - description: 'Determines if the PAID stamp is shown on the invoice' - type: boolean - example: false - show_shipping_address: - description: 'Determines if the shipping address is shown on the invoice' - type: boolean - example: false - company_logo_size: - description: 'The size of the company logo on the PDF - percentage value between 0 and 100' - type: number - example: 100 - show_email_footer: - description: 'Determines if the email footer is shown on emails' - type: boolean - example: false - email_alignment: - description: 'The alignment of the email body text, options include left / center / right' - type: string - example: 'left' - auto_bill_standard_invoices: - description: 'Determines if standard invoices are automatically billed when they are created or due' - type: boolean - example: false - postmark_secret: - description: 'The Postmark secret API key' - type: string - example: '123456' - mailgun_secret: - description: 'The Mailgun secret API key' - type: string - example: '123456' - mailgun_domain: - description: 'The Mailgun domain' - type: string - example: 'sandbox123456.mailgun.org' - send_email_on_mark_paid: - description: 'Determines if an email is sent when an invoice is marked as paid' - type: boolean - example: false - vendor_portal_enable_uploads: - description: 'Determines if vendors can upload files to the portal' - type: boolean - example: false - besr_id: - description: 'The BESR ID' - type: string - example: '123456' - qr_iban: - description: 'The IBAN for the QR code' - type: string - example: 'CH123456' - email_subject_purchase_order: - description: 'The email subject for purchase orders' - type: string - example: 'Purchase Order' - email_template_purchase_order: - description: 'The email template for purchase orders' - type: string - example: 'Please see attached your purchase order.' - require_purchase_order_signature: - description: 'Determines if a signature is required on purchase orders' - type: boolean - example: false - purchase_order_public_notes: - description: 'The public notes for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_terms: - description: 'The terms for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_footer: - description: 'The footer for purchase orders' - type: string - example: 'Please see attached your purchase order.' - purchase_order_design_id: - description: 'The design id for purchase orders' - type: string - example: 'hd677df' - purchase_order_number_pattern: - description: 'The pattern for purchase order numbers' - type: string - example: 'PO-000000' - purchase_order_number_counter: - description: 'The counter for purchase order numbers' - type: number - example: 1 - page_numbering_alignment: - description: 'The alignment for page numbering: options include left / center / right' - type: string - example: 'left' - page_numbering: - description: 'Determines if page numbering is enabled on Document PDFs' - type: boolean - example: false - auto_archive_invoice_cancelled: - description: 'Determines if invoices are automatically archived when they are cancelled' - type: boolean - example: false - email_from_name: - description: 'The FROM name for emails when using Custom emailers' - type: string - example: 'Bob Smith' - show_all_tasks_client_portal: - description: 'Determines if all tasks are shown on the client portal' - type: boolean - example: false - entity_send_time: - description: 'The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24' - type: integer - example: 9 - shared_invoice_credit_counter: - description: 'Determines if the invoice and credit counter are shared' - type: boolean - example: false - reply_to_name: - description: 'The reply to name for emails' - type: string - example: 'Bob Smith' - hide_empty_columns_on_pdf: - description: 'Determines if empty columns are hidden on PDFs' - type: boolean - example: false - enable_reminder_endless: - description: 'Determines if endless reminders are enabled' - type: boolean - example: false - use_credits_payment: - description: 'Determines if credits can be used as a payment method' - type: boolean - example: false - recurring_invoice_number_pattern: - description: 'The pattern for recurring invoice numbers' - type: string - example: 'R-000000' - recurring_invoice_number_counter: - description: 'The counter for recurring invoice numbers' - type: number - example: 1 - client_portal_under_payment_minimum: - description: 'The minimum payment payment' - type: number - example: 10 - auto_bill_date: - description: 'Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))' - type: string - example: 'on_send_date' - primary_color: - description: 'The primary color for the client portal / document highlights' - type: string - example: '#ffffff' - secondary_color: - description: 'The secondary color for the client portal / document highlights' - type: string - example: '#ffffff' - client_portal_allow_under_payment: - description: 'Determines if clients can pay invoices under the invoice amount due' - type: boolean - example: false - client_portal_allow_over_payment: - description: 'Determines if clients can pay invoices over the invoice amount' - type: boolean - example: false - auto_bill: - description: 'Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing' - type: string - example: 'off' - client_portal_terms: - description: 'The terms which are displayed on the client portal' - type: string - example: 'Please see attached your invoice.' - client_portal_privacy_policy: - description: 'The privacy policy which is displayed on the client portal' - type: string - example: 'These are the terms of use for using the client portal.' - client_can_register: - description: 'Determines if clients can register on the client portal' - type: boolean - example: false - portal_design_id: - description: 'The design id for the client portal' - type: string - example: 'hd677df' - late_fee_endless_percent: - description: 'The late fee percentage for endless late fees' - type: number - example: 10 - late_fee_endless_amount: - description: 'The late fee amount for endless late fees' - type: number - example: 10 - auto_email_invoice: - description: 'Determines if invoices are automatically emailed when they are created' - type: boolean - example: false - email_signature: - description: 'The email signature for emails' - type: string - example: 'Bob Smith' - classification: - description: 'The classification for the company' - type: string - example: 'individual' - type: object - ClientContact: - properties: - id: - description: 'The hashed if of the contact' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user who created the contact' - type: string - example: Opnel5aKBz - readOnly: true - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - readOnly: true - client_id: - description: 'The hashed id of the client' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' - type: string - example: John - last_name: - description: 'The last name of the contact' - type: string - example: Doe - phone: - description: 'The phone number of the contact' - type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' - type: string - example: '' - custom_value2: - description: 'A Custom field value' - type: string - example: '' - custom_value3: - description: 'A Custom field value' - type: string - example: '' - custom_value4: - description: 'A Custom field value' - type: string - example: '' - email: - description: 'The email of the contact' - type: string - example: '' - accepted_terms_version: - description: 'The terms of service which the contact has accpeted' - type: string - example: 'A long set of ToS' - readOnly: true - password: - description: 'The hashed password of the contact' - type: string - example: '*****' - confirmation_code: - description: 'The confirmation code used to authenticate the contacts email address' - type: string - example: 333-sdjkh34gbasd - readOnly: true - token: - description: 'A uuid based token.' - type: string - example: 333-sdjkh34gbasd - readOnly: true - contact_key: - description: 'A unique identifier for the contact' - type: string - example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a - readOnly: true - is_primary: - description: 'Defines is this contact is the primary contact for the client' - type: boolean - example: true - confirmed: - description: 'Boolean value confirms the user has confirmed their account.' - type: boolean - example: true - is_locked: - description: 'Boolean value defines if the contact has been locked out.' - type: boolean - example: true - send_email: - description: 'Boolean value determines is this contact should receive emails' - type: boolean - example: true - failed_logins: - description: 'The number of failed logins the contact has had' - type: number - format: integer - example: '3' - readOnly: true - email_verified_at: - description: 'The date which the contact confirmed their email' - type: number - format: integer - example: '134341234234' - readOnly: true - last_login: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - readOnly: true - type: object + **note** this field is not mutable without passing an extra query parameter which will allow modification of this value. - FeesAndLimits: - properties: - min_limit: - description: 'The minimum amount accepted for this gateway' - type: string - example: '2' - max_limit: - description: 'The maximum amount accepted for this gateway' - type: string - example: '2' - fee_amount: - description: 'The gateway fee amount' - type: number - format: float - example: '2.0' - fee_percent: - description: 'The gateway fee percentage' - type: number - format: float - example: '2.0' - fee_tax_name1: - description: 'Fee tax name' - type: string - example: GST - fee_tax_name2: - description: 'Fee tax name' - type: string - example: VAT - fee_tax_name3: - description: 'Fee tax name' - type: string - example: 'CA Sales Tax' - fee_tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.0' - fee_tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '17.5' - fee_tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '25.0' - fee_cap: - description: 'If set the fee amount will be no higher than this amount' - type: number - format: float - example: '2.0' - adjust_fee_percent: - description: 'Adjusts the fee to match the exact gateway fee.' - type: boolean - example: true - type: object - Account: - properties: - id: - description: 'The account hashed id' - type: string - example: AS3df3A - account_sms_verified: - description: 'Boolean flag if the account has been verified by sms' - type: string - example: true - type: object - BankTransactionRule: - properties: - id: - description: 'The bank transaction rules hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: AS3df3A - name: - description: 'The name of the transaction' - type: string - example: 'Rule 1' - rules: - description: 'A mapped collection of the sub rules for the BankTransactionRule' - type: array - items: - $ref: '#/components/schemas/BTRules' - auto_convert: - description: 'Flags whether the rule converts the transaction automatically' - type: boolean - example: true - matches_on_all: - description: 'Flags whether all subrules are required for the match' - type: boolean - example: true - applies_to: - description: 'Flags whether the rule applies to a CREDIT or DEBIT' - type: string - example: CREDIT - client_id: - description: 'The client hashed id' - type: string - example: AS3df3A - vendor_id: - description: 'The vendor hashed id' - type: string - example: AS3df3A - category_id: - description: 'The category hashed id' - type: string - example: AS3df3A - type: object - CompanyToken: - properties: - name: - description: 'The token name' - type: string - example: 'Token Name' - token: - description: 'The token value' - type: string - example: AS3df3jUUH765fhfd9KJuidj3JShjA - is_system: - description: 'Determines whether the token is created by the system rather than a user' - type: boolean - example: 'true' - type: object - CompanyUser: - properties: - permissions: - description: 'The company user permissions' - type: string - example: '[create_invoice]' - settings: - description: 'Settings that are used for the frontend applications to store user preferences / metadata' - type: object - example: 'json object' - react_settings: - description: 'Dedicated settings object for the react web application' - type: object' - example: 'json object' - is_owner: - description: 'Determines whether the user owns this company' - type: boolean - example: true - is_admin: - description: 'Determines whether the user is the admin of this company' - type: boolean - example: true - is_locked: - description: 'Determines whether the users access to this company has been locked' - type: boolean - example: true - updated_at: - description: 'The last time the record was modified, format Unix Timestamp' - type: integer - example: '1231232312321' - deleted_at: - description: 'Timestamp when the user was archived, format Unix Timestamp' - type: integer - example: '12312312321' - account: - $ref: '#/components/schemas/Account' - company: - $ref: '#/components/schemas/Company' - user: - $ref: '#/components/schemas/User' - token: - $ref: '#/components/schemas/CompanyToken' - type: object - InvoiceInvitationRequest: - required: - - client_contact_id - properties: - id: - description: 'The entity invitation hashed id' - type: string - example: Opnel5aKBz - readOnly: true - client_contact_id: - description: 'The client contact hashed id' - type: string - example: Opnel5aKBz - key: - description: 'The invitation key' - type: string - example: Opnel5aKBz4343343566236gvbb - readOnly: true - link: - description: 'The invitation link' - type: string - example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' - readOnly: true - sent_date: - description: 'The invitation sent date' - type: string - format: date-time - readOnly: true - viewed_date: - description: 'The invitation viewed date' - type: string - format: date-time - readOnly: true - opened_date: - description: 'The invitation opened date' - type: string - format: date-time - readOnly: true - updated_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - archived_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - email_error: - description: 'The email error' - type: string - example: 'The email error' - readOnly: true - email_status: - description: 'The email status' - type: string - readOnly: true + The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually. - InvoiceInvitation: - properties: - id: - description: 'The entity invitation hashed id' - type: string - example: Opnel5aKBz - readOnly: true - client_contact_id: - description: 'The client contact hashed id' - type: string - example: Opnel5aKBz - key: - description: 'The invitation key' - type: string - example: Opnel5aKBz4343343566236gvbb - readOnly: true - link: - description: 'The invitation link' - type: string - example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' - readOnly: true - sent_date: - description: 'The invitation sent date' - type: string - format: date-time - readOnly: true - viewed_date: - description: 'The invitation viewed date' - type: string - format: date-time - readOnly: true - opened_date: - description: 'The invitation opened date' - type: string - format: date-time - readOnly: true - updated_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - archived_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - email_error: - description: 'The email error' - type: string - example: 'The email error' - readOnly: true - email_status: - description: 'The email status' - type: string - readOnly: true + default: 0 + required: false + stock_notification: + type: boolean + description: Indicates whether stock notifications are enabled for this product + default: true + required: false + stock_notification_threshold: + type: integer + format: int32 + description: The minimum quantity threshold for which stock notifications will be triggered + default: 0 + required: false + max_quantity: + type: integer + format: int32 + description: The maximum quantity that can be ordered for this product + required: false + product_image: + type: string + description: The URL of the product image + format: uri-reference + required: false + tax_id: + type: string + default: "1" + required: false + description: | + The tax category id for this product.' - Design: - properties: - id: - description: 'The design hashed id' - type: string - example: AS3df3A - name: - description: 'The design name' - type: string - example: Beauty - design: - description: 'The design HTML' - type: string - example: '' - is_custom: - description: 'Flag to determine if the design is a custom user design' - type: boolean - example: true - is_active: - description: 'Flag to determine if the design is available for use' - type: boolean - example: true - is_deleted: - description: 'Flag to determine if the design is deleted' - type: boolean - example: true - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object + The following constants are available (default = '1') + + ``` + PRODUCT_TYPE_PHYSICAL = '1' + PRODUCT_TYPE_SERVICE = '2' + PRODUCT_TYPE_DIGITAL = '3' + PRODUCT_TYPE_SHIPPING = '4' + PRODUCT_TYPE_EXEMPT = '5' + PRODUCT_TYPE_REDUCED_TAX = '6' + PRODUCT_TYPE_OVERRIDE_TAX = '7' + PRODUCT_TYPE_ZERO_RATED = '8' + PRODUCT_TYPE_REVERSE_TAX = '9' + ``` + example: "1" + + CompanyLedger: + properties: + entity_id: + description: "This field will reference one of the following entity hashed ID payment_id, invoice_id or credit_id" + type: string + example: AS3df3A + notes: + description: "The notes which reference this entry of the ledger" + type: string + example: "Credit note for invoice #3212" + balance: + description: "The client balance" + type: number + format: float + example: "10.00" + adjustment: + description: "The amount the client balance is adjusted by" + type: number + format: float + example: "10.00" + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + created_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + type: object + Invoice: + properties: + id: + description: "The invoice hashed id" + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + readOnly: true + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + readOnly: true + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + status_id: + description: "The invoice status variable" + type: string + example: "4" + number: + description: "The invoice number - is a unique alpha numeric number per invoice per company" + type: string + example: INV_101 + po_number: + description: "The purchase order associated with this invoice" + type: string + example: PO-1234 + terms: + description: "The invoice terms" + type: string + example: "These are invoice terms" + public_notes: + description: "The public notes of the invoice" + type: string + example: "These are some public notes" + private_notes: + description: "The private notes of the invoice" + type: string + example: "These are some private notes" + footer: + description: "The invoice footer notes" + type: string + example: "" + custom_value1: + description: "A custom field value" + type: string + example: "2022-10-01" + custom_value2: + description: "A custom field value" + type: string + example: "Something custom" + custom_value3: + description: "A custom field value" + type: string + example: "" + custom_value4: + description: "A custom field value" + type: string + example: "" + tax_name1: + description: "The tax name" + type: string + example: "" + tax_name2: + description: "The tax name" + type: string + example: "" + tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_rate2: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_name3: + description: "The tax name" + type: string + example: "" + tax_rate3: + description: "The tax rate" + type: number + format: float + example: "10.00" + total_taxes: + description: "The total taxes for the invoice" + type: number + format: float + example: "10.00" + line_items: + type: array + description: "An array of objects which define the line items of the invoice" + items: + $ref: "#/components/schemas/InvoiceItem" + invitations: + type: array + description: "An array of objects which define the invitations of the invoice" + items: + $ref: "#/components/schemas/InvoiceInvitation" + amount: + description: "The invoice amount" + type: number + format: float + example: "10.00" + balance: + description: "The invoice balance" + type: number + format: float + example: "10.00" + paid_to_date: + description: "The amount paid on the invoice to date" + type: number + format: float + example: "10.00" + discount: + description: "The invoice discount, can be an amount or a percentage" + type: number + format: float + example: "10.00" + partial: + description: "The deposit/partial amount" + type: number + format: float + example: "10.00" + is_amount_discount: + description: "Flag determining if the discount is an amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Defines if the invoice has been deleted" + type: boolean + example: true + uses_inclusive_taxes: + description: "Defines the type of taxes used as either inclusive or exclusive" + type: boolean + example: true + date: + description: "The Invoice Date" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the invoice was sent out" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The Next date for a reminder to be sent" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the deposit/partial amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date of the invoice" + type: string + format: date + example: "1994-07-30" + last_viewed: + description: Timestamp + type: number + format: integer + example: "1434342123" + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + custom_surcharge1: + description: "First Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge2: + description: "Second Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge3: + description: "Third Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge4: + description: "Fourth Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge_tax1: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax2: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax3: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax4: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + project_id: + description: "The project associated with this invoice" + type: string + example: Opnel5aKBz + auto_bill_tries: + description: "The number of times the invoice has attempted to be auto billed" + type: integer + example: "1" + readOnly: true + auto_bill_enabled: + description: "Boolean flag determining if the invoice is set to auto bill" + type: boolean + example: true + subscription_id: + description: "The subscription associated with this invoice" + type: string + example: Opnel5aKBz + + type: object + Company: + properties: + id: + description: "The unique hashed identifier for the company" + type: string + example: WJxbojagwO + size_id: + description: "The unique identifier representing the company's size category" + type: string + example: "2" + industry_id: + description: "The unique identifier representing the company's industry category" + type: string + example: "5" + slack_webhook_url: + description: "The URL for the company's Slack webhook notifications" + type: string + example: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX" + google_analytics_key: + description: "The company's Google Analytics tracking ID" + type: string + example: "UA-123456789-1" + portal_mode: + description: "The mode determining how client-facing URLs are structured (e.g., subdomain, domain, or iframe)" + type: string + example: subdomain + subdomain: + description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" + type: string + example: acme + portal_domain: + description: "The fully qualified domain used for client-facing URLs" + type: string + example: "https://subdomain.invoicing.co" + enabled_tax_rates: + description: "The number of tax rates used per entity" + type: integer + example: "2" + fill_products: + description: "A flag determining whether to auto-fill product descriptions based on the product key" + type: boolean + example: true + convert_products: + description: "A flag determining whether to convert products between different types or units" + type: boolean + example: true + update_products: + description: "A flag determining whether to update product descriptions when the description changes" + type: boolean + example: true + show_product_details: + description: "A flag determining whether to display product details in the user interface" + type: boolean + example: true + show_product_cost: + description: "A flag determining whether to display product cost is shown in the user interface" + type: boolean + example: true + custom_fields: + description: "A mapping of custom fields for various objects within the company" + type: object + enable_product_cost: + description: "A flag determining whether to show or hide the product cost field in the user interface" + type: boolean + example: true + enable_product_quantity: + description: "A flag determining whether to show or hide the product quantity field in the user interface" + type: boolean + example: true + default_quantity: + description: "A flag determining whether to use a default quantity for products" + type: boolean + example: true + custom_surcharge_taxes1: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the first custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes2: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the second custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes3: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the third custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes4: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the fourth custom" + logo: + description: "The company logo file in binary format" + type: string + format: binary + example: logo.png + company_key: + description: "The static company key hash used to identify the Company" + readOnly: true + type: string + example: "Vnb14bRlwiFjc5ckte6cfbygTRkn5IMQ" + client_can_register: + description: "A flag determining whether clients can register for the client portal" + type: boolean + example: true + enabled_modules: + type: integer + description: | + Bitmask representation of the modules that are enabled in the application + + ``` + self::ENTITY_RECURRING_INVOICE => 1, + self::ENTITY_CREDIT => 2, + self::ENTITY_QUOTE => 4, + self::ENTITY_TASK => 8, + self::ENTITY_EXPENSE => 16, + self::ENTITY_PROJECT => 32, + self::ENTITY_VENDOR => 64, + self::ENTITY_TICKET => 128, + self::ENTITY_PROPOSAL => 256, + self::ENTITY_RECURRING_EXPENSE => 512, + self::ENTITY_RECURRING_TASK => 1024, + self::ENTITY_RECURRING_QUOTE => 2048, + ``` + + The default per_page value is 20. + + example: 2048 + db: + readOnly: true + type: string + example: "db-ninja-01" + first_day_of_week: + description: "The first day of the week for the company" + type: string + example: "1" + first_month_of_year: + description: "The first month for the company financial year" + type: string + example: "1" + enabled_item_tax_rates: + description: "The number of tax rates used per item" + type: integer + example: 2 + is_large: + description: "A flag determining whether the company is considered large" + type: boolean + example: true + default_auto_bill: + type: enum + example: "always" + description: | + A flag determining whether to auto-bill clients by default + + values: + + - always - Always auto bill + - disabled - Never auto bill + - optin - Allow the client to select their auto bill status with the default being disabled + - optout -Allow the client to select their auto bill status with the default being enabled + mark_expenses_invoiceable: + description: "A flag determining whether to mark expenses as invoiceable by default" + type: boolean + example: true + mark_expenses_paid: + description: "A flag determining whether to mark expenses as paid by default" + type: boolean + example: true + invoice_expense_documents: + description: "A flag determining whether to include expense documents on invoices by default" + type: boolean + example: true + auto_start_tasks: + description: "A flag determining whether to auto-start tasks by default" + type: boolean + example: true + invoice_task_timelog: + description: "A flag determining whether to include task time logs on invoices by default" + type: boolean + example: true + invoice_task_documents: + description: "A flag determining whether to include task documents on invoices by default" + type: boolean + example: true + show_tasks_table: + description: "A flag determining whether to show the tasks table on invoices by default" + type: boolean + example: true + is_disabled: + description: "A flag determining whether the company is disabled" + type: boolean + example: true + default_task_is_date_based: + description: "A flag determining whether to default tasks to be date-based" + type: boolean + example: true + enable_product_discount: + description: "A flag determining whether to show or hide the product discount field in the user interface" + type: boolean + example: true + calculate_expense_tax_by_amount: + description: "A flag determining whether to calculate expense taxes by amount" + type: boolean + example: true + expense_inclusive_taxes: + description: "A flag determining whether to include taxes in the expense amount" + type: boolean + example: true + session_timeout: + description: "The session timeout for the company" + type: integer + example: 60 + oauth_password_required: + description: "A flag determining whether to require a password for `dangerous` actions when using OAuth" + type: boolean + example: true + invoice_task_datelog: + description: "A flag determining whether to include task date logs on invoices by default" + type: boolean + example: true + default_password_timeout: + description: "The default password timeout for the company" + type: integer + example: 60 + show_task_end_date: + description: "A flag determining whether to show the task end date on invoices by default" + type: boolean + example: true + markdown_enabled: + description: "A flag determining whether markdown is enabled for the company" + type: boolean + example: true + report_include_drafts: + description: "A flag determining whether to include draft invoices in reports" + type: boolean + example: true + client_registration_fields: + description: "The client registration fields for the company" + type: object + stop_on_unpaid_recurring: + description: "A flag determining whether to stop recurring invoices when they are unpaid" + type: boolean + example: true + use_quote_terms_on_conversion: + description: "A flag determining whether to use quote terms on conversion to an invoice" + type: boolean + example: true + enable_applying_payments: + description: "A flag determining whether to enable applying payments to invoices" + type: boolean + example: true + track_inventory: + description: "A flag determining whether to track inventory for the company" + type: boolean + example: true + inventory_notification_threshold: + description: "The inventory notification threshold for the company" + type: integer + example: 60 + stock_notification: + description: "A flag determining whether to send stock notifications for the company" + type: boolean + example: true + matomo_url: + description: "The Matomo URL for the company" + type: string + example: "https://matomo.example.com" + matomo_id: + description: "The Matomo ID for the company" + type: string + example: "1" + enabled_expense_tax_rates: + description: "The number of tax rates used per expense" + type: integer + example: 2 + invoice_task_project: + description: "A flag determining whether to include the project on invoices by default" + type: boolean + example: true + report_include_deleted: + description: "A flag determining whether to include deleted invoices in reports" + type: boolean + example: true + invoice_task_lock: + description: "A flag determining whether to lock tasks when invoiced" + type: boolean + example: true + convert_payment_currency: + description: "A flag determining whether to convert the payment currency" + type: boolean + example: true + convert_expense_currency: + description: "A flag determining whether to convert the expense currency" + type: boolean + example: true + notify_vendor_when_paid: + description: "A flag determining whether to notify the vendor when an expense is paid" + type: boolean + example: true + invoice_task_hours: + description: "A flag determining whether to include the task hours on invoices by default" + type: boolean + example: true + calculate_taxes: + description: "A flag determining whether to calculate taxes for the company" + type: boolean + example: true + tax_data: + description: "The tax data for the company" + type: object + e_invoice_certificate: + description: "The e-invoice certificate for the company" + type: string + example: "-----BEGIN CERTIFICATE-----" + e_invoice_certificate_passphrase: + description: "The e-invoice certificate passphrase for the company" + type: string + example: "secret" + origin_tax_data: + description: "The origin tax data for the company" + type: object + invoice_task_project_header: + description: "A flag determining whether to include the project header on invoices by default" + type: boolean + example: true + invoice_task_item_description: + description: "A flag determining whether to include the item description on invoices by default" + type: boolean + example: true + + settings: + $ref: "#/components/schemas/CompanySettings" + type: object + InvoiceRequest: + required: + - client_id + properties: + id: + description: "The invoice hashed id" + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + readOnly: true + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + status_id: + description: "The invoice status variable" + type: string + example: "4" + readOnly: true + number: + description: "The invoice number - is a unique alpha numeric number per invoice per company" + type: string + example: INV_101 + po_number: + description: "The purchase order associated with this invoice" + type: string + example: PO-1234 + terms: + description: "The invoice terms" + type: string + example: "These are invoice terms" + public_notes: + description: "The public notes of the invoice" + type: string + example: "These are some public notes" + private_notes: + description: "The private notes of the invoice" + type: string + example: "These are some private notes" + footer: + description: "The invoice footer notes" + type: string + example: "" + custom_value1: + description: "A custom field value" + type: string + example: "2022-10-01" + custom_value2: + description: "A custom field value" + type: string + example: "Something custom" + custom_value3: + description: "A custom field value" + type: string + example: "" + custom_value4: + description: "A custom field value" + type: string + example: "" + tax_name1: + description: "The tax name" + type: string + example: "" + tax_name2: + description: "The tax name" + type: string + example: "" + tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_rate2: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_name3: + description: "The tax name" + type: string + example: "" + tax_rate3: + description: "The tax rate" + type: number + format: float + example: "10.00" + total_taxes: + description: "The total taxes for the invoice" + type: number + format: float + example: "10.00" + readOnly: + line_items: + type: array + description: "An array of objects which define the line items of the invoice" + items: + $ref: "#/components/schemas/InvoiceItem" + invitations: + type: array + description: "An array of objects which define the invitations of the invoice" + items: + $ref: "#/components/schemas/InvoiceInvitationRequest" + amount: + description: "The invoice amount" + type: number + format: float + example: "10.00" + readOnly: true + balance: + description: "The invoice balance" + type: number + format: float + example: "10.00" + readOnly: true + paid_to_date: + description: "The amount paid on the invoice to date" + type: number + format: float + example: "10.00" + readOnly: true + discount: + description: "The invoice discount, can be an amount or a percentage" + type: number + format: float + example: "10.00" + partial: + description: "The deposit/partial amount" + type: number + format: float + example: "10.00" + is_amount_discount: + description: "Flag determining if the discount is an amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Defines if the invoice has been deleted" + type: boolean + example: true + readOnly: true + uses_inclusive_taxes: + description: "Defines the type of taxes used as either inclusive or exclusive" + type: boolean + example: true + date: + description: "The Invoice Date" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the invoice was sent out" + type: string + format: date + example: "1994-07-30" + readOnly: true + next_send_date: + description: "The Next date for a reminder to be sent" + type: string + format: date + example: "1994-07-30" + readOnly: true + partial_due_date: + description: "The due date for the deposit/partial amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date of the invoice" + type: string + format: date + example: "1994-07-30" + last_viewed: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + custom_surcharge1: + description: "First Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge2: + description: "Second Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge3: + description: "Third Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge4: + description: "Fourth Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge_tax1: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax2: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax3: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax4: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + project_id: + description: "The project associated with this invoice" + type: string + example: Opnel5aKBz + type: object + SystemLog: + properties: + id: + description: "The account hashed id" + type: string + example: AS3df3A + company_id: + description: "The company hashed id" + type: string + example: AS3df3A + user_id: + description: "The user_id hashed id" + type: string + example: AS3df3A + client_id: + description: "The client_id hashed id" + type: string + example: AS3df3A + event_id: + description: "The Log Type ID" + type: integer + example: 1 + category_id: + description: "The Category Type ID" + type: integer + example: 1 + type_id: + description: "The Type Type ID" + type: integer + example: 1 + log: + description: "The json object of the error" + type: object + example: "{'key':'value'}" + updated_at: + description: Timestamp + type: string + example: "2" + created_at: + description: Timestamp + type: string + example: "2" + type: object + Expense: + properties: + id: + description: "The expense hashed id" + type: string + example: "Opnel5aKBz" + user_id: + description: "The user hashed id" + type: string + example: "Opnel5aKBz" + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: "Opnel5aKBz" + project_id: + description: "The associated project_id" + type: string + example: "Opnel5aKBz" + company_id: + description: "The company hashed id" + type: string + example: "Opnel5aKBz" + client_id: + description: "The client hashed id" + type: string + example: "Opnel5aKBz" + invoice_id: + description: "The related invoice hashed id" + type: string + example: "Opnel5aKBz" + bank_id: + description: "The bank id related to this expense" + type: string + example: "" + invoice_currency_id: + description: "The currency id of the related invoice" + type: string + example: "1" + expense_currency_id: + description: "The currency id of the expense" + type: string + example: "2" + invoice_category_id: + description: "The invoice category id" + type: string + example: "Opnel5aKBz" + payment_type_id: + description: "The payment type id" + type: string + example: "" + recurring_expense_id: + description: "The related recurring expense this expense was created from" + type: string + example: "Opnel5aKBz" + private_notes: + description: "The private notes of the expense" + type: string + example: "" + public_notes: + description: "The public notes of the expense" + type: string + example: "" + transaction_reference: + description: "The transaction references of the expense" + type: string + example: "" + transcation_id: + description: "The transaction id of the expense" + type: string + example: "" + custom_value1: + description: "A custom value" + type: string + example: "" + custom_value2: + description: "A custom value" + type: string + example: "" + custom_value3: + description: "A custom value" + type: string + example: "" + custom_value4: + description: "A custom value" + type: string + example: "" + tax_amount: + description: "The tax amount" + type: number + example: 10.00 + tax_name1: + description: "Tax Name 1" + type: string + example: "GST" + tax_name2: + description: "Tax Name 2" + type: string + example: "VAT" + tax_name3: + description: "Tax Name 3" + type: string + example: "IVA" + tax_rate1: + description: "Tax rate 1" + type: number + format: float + example: "10.00" + tax_rate2: + description: "Tax rate 2" + type: number + format: float + example: "10.00" + tax_rate3: + description: "Tax rate 3" + type: number + format: float + example: "10.00" + amount: + description: "The total expense amont" + type: number + format: float + example: "10.00" + foreign_amount: + description: "The total foreign amount of the expense" + type: number + format: float + example: "10.00" + exchange_rate: + description: "The exchange rate at the time of the expense" + type: number + format: float + example: "0.80" + date: + description: "The expense date format Y-m-d" + type: string + example: "2022-12-01" + payment_date: + description: "The date of payment for the expense, format Y-m-d" + type: string + example: "2022-12-01" + should_be_invoiced: + description: "Flag whether the expense should be invoiced" + type: boolean + example: true + is_deleted: + description: "Boolean determining whether the expense has been deleted" + type: boolean + example: true + invoice_documents: + description: "Passing the expense documents over to the invoice" + type: boolean + example: true + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + type: object + BankTransaction: + properties: + id: + description: "The bank integration hashed id" + type: string + example: AS3df3A + company_id: + description: "The company hashed id" + type: string + example: AS3df3A + user_id: + description: "The user hashed id" + type: string + example: AS3df3A + transaction_id: + description: "The id of the transaction rule" + type: integer + example: 343434 + amount: + description: "The transaction amount" + type: number + example: 10 + currency_id: + description: "The currency ID of the currency" + type: string + example: "1" + account_type: + description: "The account type" + type: string + example: creditCard + description: + description: "The description of the transaction" + type: string + example: "Potato purchases for kevin" + category_id: + description: "The category id" + type: integer + example: 1 + category_type: + description: "The category description" + type: string + example: Expenses + base_type: + description: "Either CREDIT or DEBIT" + type: string + example: CREDIT + date: + description: "The date of the transaction" + type: string + example: "2022-09-01" + bank_account_id: + description: "The ID number of the bank account" + type: integer + example: "1" + type: object + ExpenseCategory: + properties: + id: + description: "The expense hashed id" + type: string + example: Opnel5aKBz + name: + description: "The expense category name" + type: string + example: Accounting + user_id: + description: "The user hashed id" + type: string + example: XS987sD + is_deleted: + description: "Flag determining whether the expense category has been deleted" + type: boolean + example: true + updated_at: + description: "The updated at timestamp" + type: integer + example: "2" + created_at: + description: "The created at timestamp" + type: integer + example: "2" + type: object + BankIntegration: + properties: + id: + description: "The bank integration hashed id" + type: string + example: AS3df3A + company_id: + description: "The company hashed id" + type: string + example: AS3df3A + user_id: + description: "The user hashed id" + type: string + example: AS3df3A + provider_bank_name: + description: "The providers bank name" + type: string + example: "Chase Bank" + bank_account_id: + description: "The bank account id" + type: integer + example: "1233434" + bank_account_name: + description: "The name of the account" + type: string + example: "My Checking Acc" + bank_account_number: + description: "The account number" + type: string + example: "111 234 2332" + bank_account_status: + description: "The status of the bank account" + type: string + example: ACTIVE + bank_account_type: + description: "The type of account" + type: string + example: CREDITCARD + balance: + description: "The current bank balance if available" + type: number + example: "1000000" + currency: + description: "iso_3166_3 code" + type: string + example: USD + type: object + Subscription: + properties: + id: + description: Unique identifier for the subscription + type: string + example: Opnel5aKBz + user_id: + description: Unique identifier for the user associated with the subscription + type: string + example: Ua6Rw4pVbS + product_id: + description: Unique identifier for the product associated with the subscription + type: string + example: Pr5Ft7yBmC + company_id: + description: Unique identifier for the company associated with the subscription + type: string + example: Co7Vn3yLmW + recurring_invoice_id: + description: Unique identifier for the recurring invoice associated with the subscription + type: string + example: Ri2Yt8zJkP + is_recurring: + description: Indicates whether the subscription is recurring + type: boolean + example: "true" + frequency_id: + description: "integer const representation of the frequency" + type: string + example: "1" + auto_bill: + description: "enum setting" + type: string + example: always + promo_code: + description: Promotional code applied to the subscription + type: string + example: PROMOCODE4U + promo_discount: + description: Discount percentage or amount applied to the subscription + type: number + example: 10 + is_amount_discount: + description: Indicates whether the discount is a fixed amount + type: boolean + example: "true" + allow_cancellation: + description: Indicates whether the subscription can be cancelled + type: boolean + example: "true" + per_seat_enabled: + description: Indicates whether the subscription pricing is per seat + type: boolean + example: "true" + currency_id: + description: Unique identifier for the currency used in the subscription + type: integer + example: "1" + max_seats_limit: + description: Maximum number of seats allowed for the subscription + type: integer + example: "100" + trial_enabled: + description: Indicates whether the subscription has a trial period + type: boolean + example: "true" + trial_duration: + description: Duration of the trial period in days + type: integer + example: "14" + allow_query_overrides: + description: Indicates whether query overrides are allowed for the subscription + type: boolean + example: "true" + allow_plan_changes: + description: Indicates whether plan changes are allowed for the subscription + type: boolean + example: "true" + refund_period: + description: Number of days within which refunds can be requested + type: integer + example: "30" + webhook_configuration: + description: Webhook configuration for the subscription + type: string + example: "expand reference for this" + is_deleted: + description: Indicates whether the subscription has been deleted + type: boolean + example: "false" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + type: object + BulkAction: + type: array + items: + type: integer + example: "[0,1,2,3,]" + FillableInvoice: + properties: + assigned_user_id: + description: "The assigned user's hashed ID" + type: string + example: "a1b2c3d4" + client_id: + description: "The client's hashed ID" + type: string + example: "x1y2z3a4" + number: + description: "The unique alphanumeric invoice number for each invoice per company" + type: string + example: INV_101 + po_number: + description: "The purchase order number associated with the invoice" + type: string + example: "PO12345" + terms: + description: "The terms and conditions for the invoice" + type: string + example: "Net 30" + public_notes: + description: "Public notes visible to the client on the invoice" + type: string + example: "Thank you for your business." + private_notes: + description: "Private notes for internal use only" + type: string + example: "Client is a slow payer." + footer: + description: "The footer text displayed on the invoice" + type: string + example: "Authorized Signature" + custom_value1: + description: "First custom value for additional information" + type: string + example: "Project ABC" + custom_value2: + description: "Second custom value for additional information" + type: string + example: "Department XYZ" + custom_value3: + description: "Third custom value for additional information" + type: string + example: "Location 123" + custom_value4: + description: "Fourth custom value for additional information" + type: string + example: "Currency USD" + tax_name1: + description: "Name of the first tax applied to the invoice" + type: string + example: "VAT" + tax_name2: + description: "Name of the second tax applied to the invoice" + type: string + example: "GST" + tax_rate1: + description: "Rate of the first tax applied to the invoice" + type: number + example: 10.00 + tax_rate2: + description: "Rate of the second tax applied to the invoice" + type: number + example: 5.00 + tax_name3: + description: "Name of the third tax applied to the invoice" + type: string + example: "PST" + tax_rate3: + description: "Rate of the third tax applied to the invoice" + type: number + example: 8.00 + line_items: + type: array + description: "An array of objects which define the line items of the invoice" + items: + $ref: "#/components/schemas/InvoiceItem" + discount: + description: "The discount applied to the invoice" + type: number + example: 10.00 + partial: + description: "The partial amount applied to the invoice" + type: number + example: 20.00 + is_amount_discount: + description: "Indicates whether the discount applied is a fixed amount or a percentage" + type: boolean + example: true + uses_inclusive_taxes: + description: "Indicates whether the tax rates applied to the invoice are inclusive or exclusive" + type: boolean + example: true + date: + description: "The date the invoice was issued" + type: string + example: "1994-07-30" + partial_due_date: + description: "The due date for the partial payment" + type: string + example: "1994-08-15" + due_date: + description: "The due date for the invoice" + type: string + example: "1994-08-30" + custom_surcharge1: + description: "First custom surcharge applied to the invoice" + type: number + example: 10.00 + custom_surcharge2: + description: "Second custom surcharge applied to the invoice" + type: number + example: 15.00 + custom_surcharge3: + description: "Third custom surcharge applied to the invoice" + type: number + example: 5.00 + custom_surcharge4: + description: "Fourth custom surcharge applied to the invoice" + type: number + example: 20.00 + type: object + RecurringQuote: + properties: + id: + description: "The hashed id of the recurring quote" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + status_id: + description: "The quote status variable" + type: string + example: "4" + frequency_id: + description: "The recurring quote frequency" + type: number + example: "4" + remaining_cycles: + description: "The number of quotes left to be generated" + type: number + example: "4" + number: + description: "The recurringquote number - is a unique alpha numeric number per quote per company" + type: string + example: INV_101 + po_number: + description: "The purchase order associated with this recurring quote" + type: string + example: PO-1234 + terms: + description: "The quote terms" + type: string + example: "These are quote terms" + public_notes: + description: "The public notes of the quote" + type: string + example: "These are some public notes" + private_notes: + description: "The private notes of the quote" + type: string + example: "These are some private notes" + footer: + description: "The quote footer notes" + type: string + example: "" + custom_value1: + description: "A custom field value" + type: string + example: "2022-10-01" + custom_value2: + description: "A custom field value" + type: string + example: "Something custom" + custom_value3: + description: "A custom field value" + type: string + example: "" + custom_value4: + description: "A custom field value" + type: string + example: "" + tax_name1: + description: "The tax name" + type: string + example: "" + tax_name2: + description: "The tax name" + type: string + example: "" + tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_rate2: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_name3: + description: "The tax name" + type: string + example: "" + tax_rate3: + description: "The tax rate" + type: number + format: float + example: "10.00" + total_taxes: + description: "The total taxes for the quote" + type: number + format: float + example: "10.00" + line_items: + description: "An array of objects which define the line items of the quote" + type: object + example: "" + amount: + description: "The quote amount" + type: number + format: float + example: "10.00" + balance: + description: "The quote balance" + type: number + format: float + example: "10.00" + paid_to_date: + description: "The amount paid on the quote to date" + type: number + format: float + example: "10.00" + discount: + description: "The quote discount, can be an amount or a percentage" + type: number + format: float + example: "10.00" + partial: + description: "The deposit/partial amount" + type: number + format: float + example: "10.00" + is_amount_discount: + description: "Flag determining if the discount is an amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Defines if the quote has been deleted" + type: boolean + example: true + uses_inclusive_taxes: + description: "Defines the type of taxes used as either inclusive or exclusive" + type: boolean + example: true + date: + description: "The quote Date" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the quote was sent out" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The Next date for a reminder to be sent" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the deposit/partial amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date of the quote" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: Timestamp + type: number + format: integer + example: "1434342123" + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + custom_surcharge1: + description: "First Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge2: + description: "Second Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge3: + description: "Third Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge4: + description: "Fourth Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge_tax1: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax2: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax3: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax4: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + type: object + Paymentable: + properties: + id: + description: "The paymentable hashed id" + type: string + example: AS3df3A + invoice_id: + description: "The invoice hashed id" + type: string + example: AS3df3A + credit_id: + description: "The credit hashed id" + type: string + example: AS3df3A + refunded: + description: "The amount that has been refunded for this payment" + type: number + format: float + example: "10.00" + amount: + description: "The amount that has been applied to the payment" + type: number + format: float + example: "10.00" + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + created_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + type: object + Meta: + properties: + pagination: + $ref: "#/components/schemas/Pagination" + Pagination: + type: object + properties: + total: + type: integer + description: "The total number of items" + example: 1 + readOnly: true + count: + type: integer + description: "The number of items per page" + example: 1 + readOnly: true + per_page: + type: integer + description: "The number of items per page" + example: 1 + readOnly: true + current_page: + type: integer + description: "The current page number" + example: 1 + readOnly: true + total_pages: + type: integer + description: "The total number of pages" + example: 1 + readOnly: true + links: + type: array + description: "The pagination links" + readOnly: true + Project: + type: object + properties: + id: + description: "The project hashed id" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + assigned_user_id: + description: The assigned user identifier associated with the project + type: string + example: Opnel5aKBz + client_id: + type: string + example: Opnel5aKBz + description: The client identifier associated with the project + name: + type: string + description: The name of the project + example: "New Project" + task_rate: + type: number + format: float + example: 10 + description: The default rate per task for the project + due_date: + type: string + format: date + example: "2019-01-01" + description: The due date for the project + private_notes: + type: string + description: Private notes associated with the project + budgeted_hours: + type: number + format: float + description: The number of budgeted hours for the project + custom_value1: + type: string + description: Custom value field 1 + custom_value2: + type: string + description: Custom value field 2 + custom_value3: + type: string + description: Custom value field 3 + custom_value4: + type: string + description: Custom value field 4 + created_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the project creation + updated_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the last project update + archived_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the project deletion + public_notes: + type: string + description: Public notes associated with the project + is_deleted: + type: boolean + description: A flag indicating if the project is deleted + number: + type: string + description: The project number + color: + type: string + description: The color associated with the project + required: + - id + - user_id + - company_id + - name + - task_rate + - budgeted_hours + - is_deleted + - color + + Client: + properties: + id: + description: "The unique identifier of the client" + type: string + example: Opnel5aKBz + readOnly: true + contacts: + type: array + items: + $ref: "#/components/schemas/ClientContact" + user_id: + description: "The unique identifier of the user who created the client" + type: string + example: Ua6Rw4pVbS + readOnly: true + assigned_user_id: + description: "The unique identifier of the user who has been assigned the client" + type: string + example: Ua6Rw4pVbS + company_id: + description: "The unique identifier of the company the client belongs to" + type: string + example: Co7Vn3yLmW + readOnly: true + name: + description: "The name of the client company or organization" + type: string + example: "Jim's Housekeeping" + website: + description: "The website URL of the client company or organization" + type: string + example: "https://www.jims-housekeeping.com" + private_notes: + description: "Notes that are only visible to the user who created the client" + type: string + example: "Client prefers email communication over phone calls" + client_hash: + description: "A unique hash value for the client" + type: string + example: asdfkjhk342hjhbfdvmnfb1 + readOnly: true + industry_id: + description: "The unique identifier of the industry the client operates in" + type: number + example: "5" + size_id: + description: "The unique identifier for the size category of the client company or organization" + type: number + example: "2" + address1: + description: "First line of the client's address" + type: string + example: "123 Main St" + address2: + description: "Second line of the client's address, if needed" + type: string + example: "Apt 4B" + city: + description: "The city the client is located in" + type: string + example: "Beverly Hills" + state: + description: "The state, province, or locality the client is located in" + type: string + example: "California" + postal_code: + description: "The postal code or ZIP code of the client" + type: string + example: "90210" + phone: + description: "The client's phone number" + type: string + example: "555-3434-3434" + country_id: + description: "The unique identifier of the client's country" + type: number + format: integer + example: "1" + custom_value1: + description: "A custom field for storing additional information" + type: string + example: "Preferred contact: Email" + custom_value2: + description: "A custom field for storing additional information" + type: string + example: "Account manager: John Doe" + custom_value3: + description: "A custom field for storing additional information" + type: string + example: "VIP client: Yes" + custom_value4: + description: "A custom field for storing additional information" + type: string + example: "Annual contract value: $50,000" + vat_number: + description: "The client's VAT (Value Added Tax) number, if applicable" + type: string + example: "VAT123456" + id_number: + description: "A unique identification number for the client, such as a tax ID or business registration number" + type: string + number: + description: "A system-assigned unique number for the client, typically used for invoicing purposes" + type: string + example: "CL-0001" + shipping_address1: + description: "First line of the client's shipping address" + type: string + example: "5 Wallaby Way" + shipping_address2: + description: "Second line of the client's shipping address, if needed" + type: string + example: "Suite 5" + shipping_city: + description: "The city of the client's shipping address" + type: string + example: "Perth" + shipping_state: + description: "The state, province, or locality of the client's shipping address" + type: string + example: "Western Australia" + shipping_postal_code: + description: "The postal code or ZIP code of the client's shipping address" + type: string + example: "6110" + shipping_country_id: + description: "The unique identifier of the country for the client's shipping address" + type: number + format: integer + example: "4" + is_deleted: + description: "A boolean value indicating whether the client has been deleted or not" + type: boolean + example: false + readOnly: true + balance: + description: "The outstanding balance the client owes" + type: number + format: float + example: "500.00" + readOnly: true + paid_to_date: + description: "The total amount the client has paid to date" + type: number + format: float + example: "2000.00" + readOnly: true + credit_balance: + description: "The available credit balance for the client to use on future purchases" + type: number + format: float + example: "100.00" + readOnly: true + last_login: + description: "The timestamp of the client's last login" + type: number + format: integer + example: "1628686031" + readOnly: true + created_at: + description: "The timestamp when the client was created" + type: number + format: integer + example: "1617629031" + readOnly: true + updated_at: + description: "The timestamp when the client was last updated" + type: number + format: integer + example: "1628445631" + readOnly: true + group_settings_id: + description: "The group settings assigned to the client" + type: string + example: Opnel5aKBz + routing_id: + description: "The routing address id for e-invoicing for this client" + type: string + example: Opnel5aKBz3489-dfkiu-2239-sdsd + is_tax_exempt: + description: "Flag which defines if the client is exempt from taxes" + type: boolean + example: false + has_valid_vat_number: + description: "Flag which defines if the client has a valid VAT number" + type: boolean + example: false + readOnly: true + payment_balance: + description: "Defines the payment balance the client has on file (pre payments / over payments / unapplied amounts)" + type: number + example: 100 + readOnly: true + settings: + $ref: "#/components/schemas/ClientSettings" + type: object + Vendor: + properties: + id: + description: "The hashed id of the vendor. This is a unique identifier for the vendor." + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: "The hashed id of the user who created the vendor. This is a unique identifier for the user." + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The hashed id of the assigned user to this vendor. This is a unique identifier for the user." + type: string + example: Opnel5aKBz + company_id: + description: "The hashed id of the company. This is a unique identifier for the company." + type: string + example: Opnel5aKBz + contacts: + type: array + items: + $ref: "#/components/schemas/VendorContact" + description: "An array of contacts associated with the vendor." + name: + description: "The name of the vendor." + type: string + example: "Harry cafe de wheels" + classification: + description: "The classification of the vendor." + type: string + example: "individual" + website: + description: "The website of the vendor." + type: string + example: www.harry.com + private_notes: + description: "The private notes of the vendor. These notes are only visible to users with appropriate permissions." + type: string + example: "Shhh, do not tell the vendor" + industry_id: + description: "The industry id of the vendor. This is a unique identifier for the industry." + type: string + example: "1" + size_id: + description: "The size id of the vendor. This is a unique identifier for the size of the vendor." + type: string + example: "" + address1: + description: "The first line of the vendor's address." + type: string + example: "" + address2: + description: "The second line of the vendor's address." + type: string + example: "" + city: + description: "The city of the vendor's address." + type: string + example: "" + state: + description: "The state of the vendor's address." + type: string + example: "" + postal_code: + description: "The postal code of the vendor's address." + type: string + example: "" + phone: + description: "The phone number of the vendor." + type: string + example: 555-3434-3434 + country_id: + description: "The country id of the vendor. This is a unique identifier for the country." + type: string + example: "" + currency_id: + description: "The currency id of the vendor. This is a unique identifier for the currency." + type: string + example: "4" + custom_value1: + description: "The value of the first custom field for the vendor." + type: string + example: "" + custom_value2: + description: "The value of the second custom field for the vendor." + type: string + example: "" + custom_value3: + description: "The value of the third custom field for the vendor." + type: string + example: "" + custom_value4: + description: "The value of the fourth custom field for the vendor." + type: string + example: "" + vat_number: + description: "The VAT number of the vendor." + type: string + example: "" + id_number: + description: "The ID number of the vendor." + type: string + example: "" + number: + description: "The number of the vendor" + type: string + example: "11234" + is_deleted: + description: "Boolean flag determining if the vendor has been deleted" + type: boolean + example: true + language_id: + description: "The language id of the vendor. This is a unique identifier for the language." + type: string + example: "1" + vendor_hash: + description: "The vendor hash of the vendor. This is a unique identifier for the vendor." + type: string + example: "aaa-sss-www" + readOnly: true + transaction_name: + description: "The transaction name of the vendor." + type: string + example: "aaa-sss-www" + last_login: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + display_name: + description: "The display name of the vendor." + type: string + example: "Bob the vendor" + readOnly: true + type: object + VendorContact: + properties: + id: + description: "The hashed id of the vendor contact" + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: "The hashed id of the user id" + type: string + example: Opnel5aKBz + readOnly: true + company_id: + description: "The hashed id of the company" + type: string + example: Opnel5aKBz + readOnly: true + vendor_id: + description: "The hashed id of the vendor" + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: "The first name of the contact" + type: string + example: Harry + last_name: + description: "The last name of the contact" + type: string + example: Windsor + contact_key: + description: "A unique identifier for the contact" + type: string + example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a + readOnly: true + confirmation_code: + description: "The confirmation code used to authenticate the contacts email address" + type: string + example: 333-sdjkh34gbasd + readOnly: true + phone: + description: "The contacts phone number" + type: string + example: 555-123-1234 + custom_value1: + description: "A custom value" + type: string + example: "2022-10-10" + custom_value2: + description: "A custom value" + type: string + example: $1000 + custom_value3: + description: "A custom value" + type: string + example: "" + custom_value4: + description: "A custom value" + type: string + example: "" + email: + description: "The contact email address" + type: string + example: harry@windsor.com + email_verified_at: + description: "The date which the contact confirmed their email" + type: number + format: integer + example: "134341234234" + readOnly: true + password: + description: "The hashed password of the contact" + type: string + example: "*****" + is_primary: + description: "Boolean flag determining if the contact is the primary contact for the vendor" + type: boolean + example: true + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + deleted_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + type: object + Quote: + properties: + id: + description: "The unique hashed identifier for the quote" + type: string + example: Opnel5aKBz + user_id: + description: "The unique hashed identifier for the user who created the quote" + type: string + example: "" + assigned_user_id: + description: "The unique hashed identifier for the user assigned to the quote" + type: string + example: "" + company_id: + description: "The unique hashed identifier for the company associated with the quote" + type: string + example: "" + client_id: + description: "The unique hashed identifier for the client associated with the quote" + type: string + example: "" + status_id: + description: "The status of the quote represented by a unique identifier" + type: string + example: "" + number: + description: "The unique alpha-numeric quote number for the quote per company" + type: string + example: QUOTE_101 + po_number: + description: "The purchase order number associated with the quote" + type: string + example: PO-1234 + terms: + description: "The terms and conditions for the quote" + type: string + example: "These are some quote terms. Valid for 14 days." + public_notes: + description: "Publicly visible notes associated with the quote" + type: string + example: "These are public notes which the client may see" + private_notes: + description: "Privately visible notes associated with the quote, not disclosed to the client" + type: string + example: "These are private notes, not to be disclosed to the client" + footer: + description: "The footer text of the quote" + type: string + example: "The text goes in the footer of the quote" + custom_value1: + description: "First custom value field for additional information" + type: string + example: "A custom value" + custom_value2: + description: "Second custom value field for additional information" + type: string + example: "A custom value" + custom_value3: + description: "Third custom value field for additional information" + type: string + example: "A custom value" + custom_value4: + description: "Fourth custom value field for additional information" + type: string + example: "A custom value" + tax_name1: + description: "The name of the first tax applied to the quote" + type: string + example: GST + tax_name2: + description: "The name of the second tax applied to the quote" + type: string + example: VAT + tax_rate1: + description: "The rate of the first tax applied to the quote" + type: number + format: float + example: 10.00 + tax_rate2: + description: "The rate of the second tax applied to the quote" + type: number + format: float + example: 10.00 + tax_name3: + description: "The name of the third tax applied to the quote" + type: string + example: "" + tax_rate3: + description: "The rate of the third tax applied to the quote" + type: number + format: float + example: 10.00 + total_taxes: + description: "The total amount of taxes for the quote" + type: number + format: float + example: 10.00 + line_items: + type: array + description: "An array of objects which define the line items of the quote" + items: + $ref: "#/components/schemas/InvoiceItem" + amount: + description: "The total amount of the quote before taxes and discounts" + type: number + format: float + example: 10.00 + balance: + description: "The balance due for the quote after accounting for payments" + type: number + format: float + example: 10.00 + paid_to_date: + description: "The total amount paid on the quote so far" + type: number + format: float + example: 10.00 + discount: + description: "The discount amount or percentage applied to the quote" + type: number + format: float + example: 10.00 + partial: + description: "The partial or deposit amount for the quote" + type: number + format: float + example: 10.00 + is_amount_discount: + description: "Boolean flag indicating if the discount is a fixed amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Boolean flag indicating if the quote has been deleted" + type: boolean + example: false + uses_inclusive_taxes: + description: "Boolean flag indicating if the taxes used are inclusive or exclusive" + type: boolean + example: true + date: + description: "The date the quote was created" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the quote was sent to the client" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The next scheduled date for sending a reminder for the quote" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the partial or deposit amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date for the total amount of the quote" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: "The timestamp of the last time the quote was viewed" + type: number + format: integer + example: 1434342123 + updated_at: + description: "The timestamp of the last update to the quote" + type: number + format: integer + example: 1434342123 + archived_at: + description: "The timestamp of when the quote was archived" + type: number + format: integer + example: 1434342123 + custom_surcharge1: + description: "First custom surcharge amount for the quote" + type: number + format: float + example: 10.00 + custom_surcharge2: + description: "Second custom surcharge amount for the quote" + type: number + format: float + example: 10.00 + custom_surcharge3: + description: "Third custom surcharge amount for the quote" + type: number + format: float + example: 10.00 + custom_surcharge4: + description: "Fourth custom surcharge amount for the quote" + type: number + format: float + example: 10.00 + custom_surcharge_tax1: + description: "Boolean flag indicating if taxes are charged on the first custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax2: + description: "Boolean flag indicating if taxes are charged on the second custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax3: + description: "Boolean flag indicating if taxes are charged on the third custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax4: + description: "Boolean flag indicating if taxes are charged on the fourth custom surcharge amount" + type: boolean + example: true + type: object + Payment: + properties: + id: + description: "The payment hashed id" + type: string + example: Opnel5aKBz + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + invitation_id: + description: "The invitation hashed id" + type: string + example: Opnel5aKBz + client_contact_id: + description: "The client contact hashed id" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + type_id: + description: "The Payment Type ID" + type: string + example: "1" + date: + description: "The Payment date" + type: string + example: 1-1-2014 + transaction_reference: + description: "The transaction reference as defined by the payment gateway" + type: string + example: xcsSxcs124asd + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: Opnel5aKBz + private_notes: + description: "The private notes of the payment" + type: string + example: "The payment was refunded due to error" + is_manual: + description: "Flags whether the payment was made manually or processed via a gateway" + type: boolean + example: true + is_deleted: + description: "Defines if the payment has been deleted" + type: boolean + example: true + amount: + description: "The amount of this payment" + type: number + example: 10 + refunded: + description: "The refunded amount of this payment" + type: number + example: 10 + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + company_gateway_id: + description: "The company gateway id" + type: string + example: "3" + paymentables: + $ref: "#/components/schemas/Paymentable" + invoices: + description: "" + type: array + items: + $ref: "#/components/schemas/InvoicePaymentable" + credits: + description: "" + type: array + items: + $ref: "#/components/schemas/CreditPaymentable" + number: + description: "The payment number - is a unique alpha numeric number per payment per company" + type: string + example: PAY_101 + type: object + + Task: + properties: + id: + description: "The hashed id of the task" + type: string + example: Opnel5aKBz + user_id: + description: "The hashed id of the user who created the task" + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The assigned user of the task" + type: string + example: Opnel5aKBz + company_id: + description: "The hashed id of the company" + type: string + example: Opnel5aKBz + client_id: + description: "The hashed if of the client" + type: string + example: Opnel5aKBz + invoice_id: + description: "The hashed id of the invoice associated with the task" + type: string + example: Opnel5aKBz + project_id: + description: "The hashed id of the project associated with the task" + type: string + example: Opnel5aKBz + number: + description: "The number of the task" + type: string + example: TASK-123 + time_log: + description: "An array of unix time stamps defining the start and end times of the task" + type: string + example: "[[1,2],[3,4]]" + is_running: + description: "Determines if the task is still running" + type: boolean + example: true + is_deleted: + description: "Boolean flag determining if the task has been deleted" + type: boolean + example: true + task_status_id: + description: "The hashed id of the task status" + type: string + example: Opnel5aKBz + description: + description: "The task description" + type: string + example: "A wonder task to work on" + duration: + description: "The task duration in seconds" + type: integer + example: "3600" + task_status_order: + description: "The order of the task" + type: integer + example: "4" + rate: + description: "The task rate" + type: number + example: 10.00 + custom_value1: + description: "A custom value" + type: string + example: "2022-10-10" + custom_value2: + description: "A custom value" + type: string + example: $1100 + custom_value3: + description: "A custom value" + type: string + example: "I need help" + custom_value4: + description: "A custom value" + type: string + example: INV-3343 + is_date_based: + description: "Boolean flag determining if the task is date based" + type: boolean + example: true + calculated_start_date: + description: "The calculated start date of the task" + type: string + example: "2022-10-10" + readOnly: true + invoice_documents: + description: "Boolean flags which determines whether to include the task documents on the invoice" + type: boolean + example: true + created_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + readOnly: true + type: object + RecurringInvoice: + properties: + id: + description: "The hashed id of the recurring invoice" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + status_id: + description: "The invoice status variable" + type: string + example: "4" + frequency_id: + description: "The recurring invoice frequency" + type: number + example: "4" + remaining_cycles: + description: "The number of invoices left to be generated" + type: number + example: "4" + number: + description: "The recurringinvoice number - is a unique alpha numeric number per invoice per company" + type: string + example: INV_101 + po_number: + description: "The purchase order associated with this recurring invoice" + type: string + example: PO-1234 + terms: + description: "The invoice terms" + type: string + example: "These are invoice terms" + public_notes: + description: "The public notes of the invoice" + type: string + example: "These are some public notes" + private_notes: + description: "The private notes of the invoice" + type: string + example: "These are some private notes" + footer: + description: "The invoice footer notes" + type: string + example: "" + custom_value1: + description: "A custom field value" + type: string + example: "2022-10-01" + custom_value2: + description: "A custom field value" + type: string + example: "Something custom" + custom_value3: + description: "A custom field value" + type: string + example: "" + custom_value4: + description: "A custom field value" + type: string + example: "" + tax_name1: + description: "The tax name" + type: string + example: "" + tax_name2: + description: "The tax name" + type: string + example: "" + tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_rate2: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_name3: + description: "The tax name" + type: string + example: "" + tax_rate3: + description: "The tax rate" + type: number + format: float + example: "10.00" + total_taxes: + description: "The total taxes for the invoice" + type: number + format: float + example: "10.00" + line_items: + description: "An array of objects which define the line items of the invoice" + type: object + example: "" + amount: + description: "The invoice amount" + type: number + format: float + example: "10.00" + balance: + description: "The invoice balance" + type: number + format: float + example: "10.00" + paid_to_date: + description: "The amount paid on the invoice to date" + type: number + format: float + example: "10.00" + discount: + description: "The invoice discount, can be an amount or a percentage" + type: number + format: float + example: "10.00" + partial: + description: "The deposit/partial amount" + type: number + format: float + example: "10.00" + is_amount_discount: + description: "Flag determining if the discount is an amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Defines if the invoice has been deleted" + type: boolean + example: true + uses_inclusive_taxes: + description: "Defines the type of taxes used as either inclusive or exclusive" + type: boolean + example: true + date: + description: "The Invoice Date" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the invoice was sent out" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The Next date for a reminder to be sent" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the deposit/partial amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date of the invoice" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: Timestamp + type: number + format: integer + example: "1434342123" + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + custom_surcharge1: + description: "First Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge2: + description: "Second Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge3: + description: "Third Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge4: + description: "Fourth Custom Surcharge" + type: number + format: float + example: "10.00" + custom_surcharge_tax1: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax2: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax3: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + custom_surcharge_tax4: + description: "Toggles charging taxes on custom surcharge amounts" + type: boolean + example: true + type: object + + InvoiceItem: + type: object + properties: + quantity: + type: number + example: 1 + description: "The quantity of the product offered for this line item" + cost: + type: number + format: float + example: 10.00 + description: "The cost of the product offered for this line item" + product_key: + type: string + example: "Product key" + description: "The product key of the product offered for this line item (Referred to as Product in the product tab)" + product_cost: + type: number + format: float + example: 10.00 + description: "The cost of the product offered for this line item (Referred to as Cost in the product tab)" + notes: + type: string + example: "Item notes" + description: "The notes/description for the product offered for this line item" + discount: + type: number + format: float + example: 5.00 + description: "The discount applied to the product offered for this line item" + is_amount_discount: + type: boolean + example: false + description: "Indicates whether the discount applied to the product offered for this line item is a fixed amount or a percentage" + tax_name1: + type: string + example: "GST" + description: "The name of the first tax applied to the product offered for this line item" + tax_rate1: + type: number + format: float + example: 10.00 + description: "The rate of the first tax applied to the product offered for this line item" + tax_name2: + type: string + example: "VAT" + description: "The name of the second tax applied to the product offered for this line item" + tax_rate2: + type: number + format: float + example: 5.00 + description: "The rate of the second tax applied to the product offered for this line item" + tax_name3: + type: string + example: "CA Sales Tax" + description: "The name of the third tax applied to the product offered for this line item" + tax_rate3: + type: number + format: float + example: 3.00 + description: "The rate of the third tax applied to the product offered for this line item" + sort_id: + type: string + example: "0" + description: "Deprecated" + deprecated: true + line_total: + type: number + format: float + example: 10.00 + description: "The total amount of the product offered for this line item" + readOnly: true + gross_line_total: + type: number + format: float + example: 15.00 + description: "The total amount of the product offered for this line item before discounts" + readOnly: true + tax_amount: + type: number + format: float + example: 1.00 + description: "The total amount of tax applied to the product offered for this line item" + readOnly: true + date: + type: string + format: date-time + example: "2023-03-19T00:00:00Z" + description: "Deprecated" + deprecated: true + custom_value1: + type: string + example: "Custom value 1" + description: "The first custom value of the product offered for this line item" + custom_value2: + type: string + example: "Custom value 2" + description: "The second custom value of the product offered for this line item" + custom_value3: + type: string + example: "Custom value 3" + description: "The third custom value of the product offered for this line item" + custom_value4: + type: string + example: "Custom value 4" + description: "The fourth custom value of the product offered for this line item" + type_id: + type: string + example: "1" + description: "1 = product, 2 = service, 3 unpaid gateway fee, 4 paid gateway fee, 5 late fee, 6 expense" + default: "1" + tax_id: + type: string + example: "1" + default: "1" + description: "The tax ID of the product: 1 product, 2 service, 3 digital, 4 shipping, 5 exempt, 5 reduced tax, 7 override, 8 zero rate, 9 reverse tax" + Activity: + properties: + id: + description: "The id field of the activity" + type: string + example: Opnel5aKBz + activity_type_id: + description: "The activity type id" + type: string + example: Opnel5aKBz + client_id: + description: "The client hashed id" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: Opnel5aKBz + user_id: + description: "The user hashed id" + type: string + example: Opnel5aKBz + invoice_id: + description: "The invoice hashed id" + type: string + example: Opnel5aKBz + payment_id: + description: "The payment hashed id" + type: string + example: Opnel5aKBz + credit_id: + description: "The credit hashed id" + type: string + example: Opnel5aKBz + updated_at: + description: "Unixtimestamp the last time the record was updated" + type: integer + example: "343421434" + expense_id: + description: "The expense hashed id" + type: string + example: Opnel5aKBz + is_system: + description: "Defines is the activity was performed by the system" + type: boolean + example: true + contact_id: + description: "The contact hashed id" + type: string + example: Opnel5aKBz + task_id: + description: "The task hashed id" + type: string + example: Opnel5aKBz + notes: + description: "Activity Notes" + type: string + example: Opnel5aKBz + token_id: + description: "The hashed ID of the token who performed the action" + type: string + example: Opnel5aKBz + ip: + description: "The IP Address of the user who performed the action" + type: string + example: 192.168.1.252 + user: + $ref: "#/components/schemas/User" + client: + $ref: "#/components/schemas/Client" + contact: + $ref: "#/components/schemas/ClientContact" + recurring_invoice: + $ref: "#/components/schemas/RecurringInvoice" + invoice: + $ref: "#/components/schemas/Invoice" + credit: + $ref: "#/components/schemas/Credit" + quote: + $ref: "#/components/schemas/Quote" + payment: + $ref: "#/components/schemas/Payment" + expense: + $ref: "#/components/schemas/Expense" + task: + $ref: "#/components/schemas/Task" + purchase_order: + $ref: "#/components/schemas/PurchaseOrder" + vendor: + $ref: "#/components/schemas/Vendor" + vendor_contact: + $ref: "#/components/schemas/VendorContact" + type: object + + ProductBulkAction: + required: + - action + - ids + properties: + action: + type: string + example: archive + description: "The action to perform ie. archive / restore / delete / set_tax_id" + ids: + type: array + items: + format: string + type: string + example: 2J234DFA,D2J234DFA,D2J234DFA + description: string array of client hashed ids + tax_id: + type: string + example: "1" + description: | + The tax rate id to set on the list of products + + The following constants are available (default = '1') + + ``` + PRODUCT_TYPE_PHYSICAL = '1' + PRODUCT_TYPE_SERVICE = '2' + PRODUCT_TYPE_DIGITAL = '3' + PRODUCT_TYPE_SHIPPING = '4' + PRODUCT_TYPE_EXEMPT = '5' + PRODUCT_TYPE_REDUCED_TAX = '6' + PRODUCT_TYPE_OVERRIDE_TAX = '7' + PRODUCT_TYPE_ZERO_RATED = '8' + PRODUCT_TYPE_REVERSE_TAX = '9' + ``` + type: object + RecurringExpense: + properties: + id: + description: "The hashed id of the recurring expense" + type: string + example: Opnel5aKBz + user_id: + description: "The hashed id of the user who created the recurring expense" + type: string + example: Opnel5aKBz + assigned_user_id: + description: "The hashed id of the user assigned to this recurring expense" + type: string + example: Opnel5aKBz + company_id: + description: "The hashed id of the company" + type: string + example: Opnel5aKBz + client_id: + description: "The hashed id of the client" + type: string + example: Opnel5aKBz + invoice_id: + description: "The hashed id of the invoice" + type: string + example: Opnel5aKBz + bank_id: + description: "The id of the bank associated with this recurring expense" + type: string + example: "22" + invoice_currency_id: + description: "The currency id of the invoice associated with this recurring expense" + type: string + example: "1" + expense_currency_id: + description: "The currency id of the expense associated with this recurring expense" + type: string + example: "1" + invoice_category_id: + description: "The category id of the invoice" + type: string + example: "1" + payment_type_id: + description: "The payment type id" + type: string + example: "1" + private_notes: + description: "The recurring expense private notes" + type: string + example: "Private and confidential" + public_notes: + description: "The recurring expense public notes" + type: string + example: "This is the best client in the world" + transaction_reference: + description: "The recurring expense transaction reference" + type: string + example: EXP-1223-2333 + transcation_id: + description: "The transaction id of the recurring expense" + type: string + example: "1233312312" + custom_value1: + description: "Custom value field" + type: string + example: $1000 + custom_value2: + description: "Custom value field" + type: string + example: "2022-10-10" + custom_value3: + description: "Custom value field" + type: string + example: "short text" + custom_value4: + description: "Custom value field" + type: string + example: "very long text" + tax_name1: + description: "The tax name" + type: string + example: GST + tax_name2: + description: "The tax name" + type: string + example: VAT + tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_rate2: + description: "The tax rate" + type: number + format: float + example: "10.00" + tax_name3: + description: "The tax name" + type: string + example: "" + tax_rate3: + description: "The tax rate" + type: number + format: float + example: "10.00" + amount: + description: "The total amount of the recurring expense" + type: number + format: float + example: "10.00" + frequency_id: + description: "The frequency this recurring expense fires" + type: number + format: int + example: "1" + remaining_cycles: + description: "The number of remaining cycles for this recurring expense" + type: number + format: int + example: "1" + foreign_amount: + description: "The foreign currency amount of the recurring expense" + type: number + format: float + example: "10.00" + exchange_rate: + description: "The exchange rate for the expernse" + type: number + format: float + example: "0.80" + date: + description: "The date of the expense" + type: string + example: "" + payment_date: + description: "The date the expense was paid" + type: string + example: "" + should_be_invoiced: + description: "Boolean flag determining if the expense should be invoiced" + type: boolean + example: true + is_deleted: + description: "Boolean flag determining if the recurring expense is deleted" + type: boolean + example: true + last_sent_date: + description: "The Date it was sent last" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The next send date" + type: string + format: date + example: "1994-07-30" + invoice_documents: + description: "Boolean flag determining if the documents associated with this expense should be passed onto the invoice if it is converted to an invoice" + type: boolean + example: true + updated_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + archived_at: + description: Timestamp + type: number + format: integer + example: "1434342123" + type: object + PaymentTerm: + properties: + num_days: + description: "The payment term length in days" + type: integer + example: "1" + name: + description: "The payment term length in string format" + type: string + example: "NET 1" + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + archived_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + type: object + ClientGatewayToken: + properties: + id: + description: "The hashed id of the client gateway token" + type: string + example: Opnel5aKBz + company_id: + description: "The hashed id of the company" + type: string + example: "2" + client_id: + description: "The hashed_id of the client" + type: string + example: "2" + token: + description: "The payment token" + type: string + example: "2" + routing_number: + description: "THe bank account routing number" + type: string + example: "2" + company_gateway_id: + description: "The hashed id of the company gateway" + type: string + example: "2" + is_default: + description: "Flag determining if the token is the default payment method" + type: boolean + example: "true" + type: object + User: + properties: + id: + description: "The hashed id of the user" + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: "The first name of the user" + type: string + example: Brad + last_name: + description: "The last name of the user" + type: string + example: Pitt + email: + description: "The users email address" + type: string + example: brad@pitt.com + phone: + description: "The users phone number" + type: string + example: 555-1233-23232 + signature: + description: "The users sign off signature" + type: string + example: "Have a nice day!" + avatar: + description: "The users avatar" + type: string + example: "https://url.to.your/avatar.png" + accepted_terms_version: + description: "The version of the invoice ninja terms that has been accepted by the user" + type: string + example: 1.0.1 + readOnly: true + oauth_user_id: + description: "The provider id of the oauth entity" + type: string + example: jkhasdf789as6f675sdf768sdfs + readOnly: true + oauth_provider_id: + description: "The oauth entity id" + type: string + example: google + readOnly: true + language_id: + description: "The language id of the user" + type: string + example: 1 + verified_phone_number: + description: "Boolean flag if the user has their phone verified. Required to settings up 2FA" + type: boolean + example: true + readOnly: true + sms_verification_code: + description: "The sms verification code for the user. Required to settings up 2FA" + type: string + example: "123456" + readOnly: true + oauth_user_token_expiry: + description: "The expiry date of the oauth token" + type: string + example: "2022-10-10" + readOnly: true + has_password: + description: "Boolean flag determining if the user has a password" + type: boolean + example: true + readOnly: true + last_confirmed_email_address: + description: "The last confirmed email address of the user" + type: string + example: "bob@gmail.com" + readOnly: true + custom_value1: + description: "A custom value" + type: string + example: "Custom value 1" + custom_value2: + description: "A custom value" + type: string + example: "$1000" + custom_value3: + description: "A custom value" + type: string + example: "Custom value 3" + custom_value4: + description: "A custom value" + type: string + example: "Custom value 4" + is_deleted: + description: "Boolean flag determining if the user has been deleted" + type: boolean + example: true + readOnly: true + google_2fa_secret: + description: "The google 2fa secret for the user" + type: string + example: "123456" + readOnly: true + company_user: + $ref: "#/components/schemas/CompanyUser" + type: object + CompanyGateway: + properties: + id: + description: "The hashed id of the company gateway" + type: string + example: Opnel5aKBz + company_id: + description: "The company hashed id" + type: string + example: "2" + gateway_key: + description: "The gateway key (hash)" + type: string + example: "2" + accepted_credit_cards: + description: "Bitmask representation of cards" + type: integer + example: "32" + require_billing_address: + description: "Determines if the the billing address is required prior to payment." + type: boolean + example: true + require_shipping_address: + description: "Determines if the the billing address is required prior to payment." + type: boolean + example: true + config: + description: "The configuration map for the gateway" + type: string + example: dfadsfdsafsafd + update_details: + description: "Determines if the client details should be updated." + type: boolean + example: true + fees_and_limits: + description: "A mapped collection of the fees and limits for the configured gateway" + type: array + items: + $ref: "#/components/schemas/FeesAndLimits" + type: object + + Document: + properties: + id: + description: "The document hashed id" + type: string + example: AS3df3A + user_id: + description: "The user hashed id" + type: string + example: "" + assigned_user_id: + description: "The assigned user hashed id" + type: string + example: "" + project_id: + description: "The project associated with this document" + type: string + example: "" + vendor_id: + description: "The vendor associated with this documents" + type: string + example: "" + name: + description: "The document name" + type: string + example: Beauty + url: + description: "The document url" + type: string + example: Beauty + preview: + description: "The document preview url" + type: string + example: Beauty + type: + description: "The document type" + type: string + example: Beauty + disk: + description: "The document disk" + type: string + example: Beauty + hash: + description: "The document hashed" + type: string + example: Beauty + is_deleted: + description: "Flag to determine if the document is deleted" + type: boolean + example: true + is_default: + description: "Flag to determine if the document is a default doc" + type: boolean + example: true + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + deleted_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + type: object + PurchaseOrder: + properties: + id: + description: "The unique hashed identifier for the purchase order" + type: string + example: Opnel5aKBz + user_id: + description: "The unique hashed identifier for the user who created the purchase order" + type: string + example: "" + assigned_user_id: + description: "The unique hashed identifier for the user assigned to the purchase order" + type: string + example: "" + company_id: + description: "The unique hashed identifier for the company associated with the purchase order" + type: string + example: "" + vendor_id: + description: "The unique hashed identifier for the vendor associated with the purchase order" + type: string + example: "" + status_id: + description: "The status of the purchase order represented by a unique identifier" + type: string + example: "" + number: + description: "The unique alpha-numeric purchase order number per company" + type: string + example: PO_101 + quote_number: + description: "The quote number associated with this purchase order" + type: string + example: QUOTE_101 + terms: + description: "The terms and conditions for the purchase order" + type: string + example: "These are some purchase order terms. Valid for 14 days." + public_notes: + description: "Publicly visible notes associated with the purchase order" + type: string + example: "These are public notes which the vendor may see" + private_notes: + description: "Privately visible notes associated with the purchase order, not disclosed to the vendor" + type: string + example: "These are private notes, not to be disclosed to the vendor" + footer: + description: "The footer text of the purchase order" + type: string + example: "The text goes in the footer of the purchase order" + custom_value1: + description: "First custom value field for additional information" + type: string + example: "A custom value" + custom_value2: + description: "Second custom value field for additional information" + type: string + example: "A custom value" + custom_value3: + description: "Third custom value field for additional information" + type: string + example: "A custom value" + custom_value4: + description: "Fourth custom value field for additional information" + type: string + example: "A custom value" + tax_name1: + description: "The name of the first tax applied to the purchase order" + type: string + example: GST + tax_name2: + description: "The name of the second tax applied to the purchase order" + type: string + example: VAT + tax_rate1: + description: "The rate of the first tax applied to the purchase order" + type: number + format: float + example: 10.00 + tax_rate2: + description: "The rate of the second tax applied to the purchase order" + type: number + format: float + example: 10.00 + tax_name3: + description: "The name of the third tax applied to the purchase order" + type: string + example: "" + tax_rate3: + description: "The rate of the third tax applied to the purchase order" + type: number + format: float + example: 10.00 + total_taxes: + description: "The total amount of taxes applied to the purchase order" + type: number + format: float + example: 10.00 + line_items: + type: array + description: "An array of objects which define the line items of the purchase order" + items: + $ref: "#/components/schemas/InvoiceItem" + amount: + description: "The total amount of the purchase order before taxes and discounts" + type: number + format: float + example: 10.00 + balance: + description: "The balance due for the purchase order after accounting for payments" + type: number + format: float + example: 10.00 + paid_to_date: + description: "The total amount paid on the purchase order so far" + type: number + format: float + example: 10.00 + discount: + description: "The discount amount or percentage applied to the purchase order" + type: number + format: float + example: 10.00 + partial: + description: "The partial or deposit amount for the purchase order" + type: number + format: float + example: 10.00 + is_amount_discount: + description: "Boolean flag indicating if the discount is a fixed amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Boolean flag indicating if the purchase order has been deleted" + type: boolean + example: false + uses_inclusive_taxes: + description: "Boolean flag indicating if the taxes used are inclusive or exclusive" + type: boolean + example: true + date: + description: "The date the purchase order was created" + type: string + format: date + example: "1994-07-30" + last_sent_date: + description: "The last date the purchase order was sent to the vendor" + type: string + format: date + example: "1994-07-30" + next_send_date: + description: "The next scheduled date for sending a reminder for the purchase order" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the partial or deposit amount" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date for the total amount of the purchase order" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: Timestamp + type: number + format: integer + example: 1434342123 + updated_at: + description: Timestamp + type: number + format: integer + example: 1434342123 + archived_at: + description: Timestamp + type: number + format: integer + example: 1434342123 + custom_surcharge1: + description: "First custom surcharge amount for the purchase order" + type: number + format: float + example: 10.00 + custom_surcharge2: + description: "Second custom surcharge amount for the purchase order" + type: number + format: float + example: 10.00 + custom_surcharge3: + description: "Third custom surcharge amount for the purchase order" + type: number + format: float + example: 10.00 + custom_surcharge4: + description: "Fourth custom surcharge amount for the purchase order" + type: number + format: float + example: 10.00 + custom_surcharge_tax1: + description: "Boolean flag indicating if taxes are charged on the first custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax2: + description: "Boolean flag indicating if taxes are charged on the second custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax3: + description: "Boolean flag indicating if taxes are charged on the third custom surcharge amount" + type: boolean + example: true + custom_surcharge_tax4: + description: "Boolean flag indicating if taxes are charged on the fourth custom surcharge amount" + type: boolean + example: true + type: object + + ClientSettings: + required: + - currency_id + properties: + currency_id: + description: "The default currency id" + type: string + example: true + timezone_id: + description: "The timezone id" + type: string + example: "15" + date_format_id: + description: "The date format id" + type: string + example: "15" + military_time: + description: "Toggles 12/24 hour time" + type: boolean + example: true + language_id: + description: "The language id" + type: string + example: "1" + show_currency_code: + description: "Toggles whether the currency symbol or code is shown" + type: boolean + example: true + payment_terms: + description: "-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days" + type: integer + example: "1" + company_gateway_ids: + description: "A commad separate list of available gateways" + type: string + example: "1,2,3,4" + custom_value1: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value2: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value3: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value4: + description: "A Custom Label" + type: string + example: "Custom Label" + default_task_rate: + description: "The default task rate" + type: number + format: float + example: "10.00" + send_reminders: + description: "Toggles whether reminders are sent" + type: boolean + example: true + enable_client_portal_tasks: + description: "Show/hide the tasks panel in the client portal" + type: boolean + example: true + email_style: + description: "options include plain,light,dark,custom" + type: string + example: light + reply_to_email: + description: "The reply to email address" + type: string + example: email@gmail.com + bcc_email: + description: "A comma separate list of BCC emails" + type: string + example: "email@gmail.com, contact@gmail.com" + pdf_email_attachment: + description: "Toggles whether to attach PDF as attachment" + type: boolean + example: true + ubl_email_attachment: + description: "Toggles whether to attach UBL as attachment" + type: boolean + example: true + email_style_custom: + description: "The custom template" + type: string + example: "" + counter_number_applied: + description: "enum when the invoice number counter is set, ie when_saved, when_sent, when_paid" + type: string + example: when_sent + quote_number_applied: + description: "enum when the quote number counter is set, ie when_saved, when_sent" + type: string + example: when_sent + custom_message_dashboard: + description: "A custom message which is displayed on the dashboard" + type: string + example: "Please pay invoices immediately" + custom_message_unpaid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a unpaid invoice." + type: string + example: "Please pay invoices immediately" + custom_message_paid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a paid invoice." + type: string + example: "Thanks for paying this invoice!" + custom_message_unapproved_quote: + description: "A custom message which is displayed in the client portal when a client is viewing a unapproved quote." + type: string + example: "Please approve quote" + lock_invoices: + description: "Toggles whether invoices are locked once sent and cannot be modified further" + type: boolean + example: true + auto_archive_invoice: + description: "Toggles whether a invoice is archived immediately following payment" + type: boolean + example: true + auto_archive_quote: + description: "Toggles whether a quote is archived after being converted to a invoice" + type: boolean + example: true + auto_convert_quote: + description: "Toggles whether a quote is converted to a invoice when approved" + type: boolean + example: true + inclusive_taxes: + description: "Boolean flag determining whether inclusive or exclusive taxes are used" + type: boolean + example: true + task_number_pattern: + description: "Allows customisation of the task number pattern" + type: string + example: "{$year}-{$counter}" + task_number_counter: + description: "The incrementing counter for tasks" + type: integer + example: "1" + reminder_send_time: + description: "Time from UTC +0 when the email will be sent to the client" + type: integer + example: "32400" + expense_number_pattern: + description: "Allows customisation of the expense number pattern" + type: string + example: "{$year}-{$counter}" + expense_number_counter: + description: "The incrementing counter for expenses" + type: integer + example: "1" + vendor_number_pattern: + description: "Allows customisation of the vendor number pattern" + type: string + example: "{$year}-{$counter}" + vendor_number_counter: + description: "The incrementing counter for vendors" + type: integer + example: "1" + ticket_number_pattern: + description: "Allows customisation of the ticket number pattern" + type: string + example: "{$year}-{$counter}" + ticket_number_counter: + description: "The incrementing counter for tickets" + type: integer + example: "1" + payment_number_pattern: + description: "Allows customisation of the payment number pattern" + type: string + example: "{$year}-{$counter}" + payment_number_counter: + description: "The incrementing counter for payments" + type: integer + example: "1" + invoice_number_pattern: + description: "Allows customisation of the invoice number pattern" + type: string + example: "{$year}-{$counter}" + invoice_number_counter: + description: "The incrementing counter for invoices" + type: integer + example: "1" + quote_number_pattern: + description: "Allows customisation of the quote number pattern" + type: string + example: "{$year}-{$counter}" + quote_number_counter: + description: "The incrementing counter for quotes" + type: integer + example: "1" + client_number_pattern: + description: "Allows customisation of the client number pattern" + type: string + example: "{$year}-{$counter}" + client_number_counter: + description: "The incrementing counter for clients" + type: integer + example: "1" + credit_number_pattern: + description: "Allows customisation of the credit number pattern" + type: string + example: "{$year}-{$counter}" + credit_number_counter: + description: "The incrementing counter for credits" + type: integer + example: "1" + recurring_invoice_number_prefix: + description: "This string is prepended to the recurring invoice number" + type: string + example: R + reset_counter_frequency_id: + description: "CONSTANT which is used to apply the frequency which the counters are reset" + type: integer + example: "1" + reset_counter_date: + description: "The explicit date which is used to reset counters" + type: string + example: "2019-01-01" + counter_padding: + description: "Pads the counter with leading zeros" + type: integer + example: "1" + shared_invoice_quote_counter: + description: "Flags whether to share the counter for invoices and quotes" + type: boolean + example: true + update_products: + description: "Determines if client fields are updated from third party APIs" + type: boolean + example: true + convert_products: + description: "" + type: boolean + example: true + fill_products: + description: "Automatically fill products based on product_key" + type: boolean + example: true + invoice_terms: + description: "The default invoice terms" + type: string + example: "Invoice Terms are..." + quote_terms: + description: "The default quote terms" + type: string + example: "Quote Terms are..." + invoice_taxes: + description: "Taxes can be applied to the invoice" + type: number + example: "1" + invoice_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + quote_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + invoice_footer: + description: "The default invoice footer" + type: string + example: "1" + invoice_labels: + description: "JSON string of invoice labels" + type: string + example: "1" + tax_rate1: + description: "The tax rate (float)" + type: number + example: "10" + tax_name1: + description: "The tax name" + type: string + example: GST + tax_rate2: + description: "The tax rate (float)" + type: number + example: "10" + tax_name2: + description: "The tax name" + type: string + example: GST + tax_rate3: + description: "The tax rate (float)" + type: number + example: "10" + tax_name3: + description: "The tax name" + type: string + example: GST + payment_type_id: + description: "The default payment type id" + type: string + example: "1" + custom_fields: + description: "JSON string of custom fields" + type: string + example: "{}" + email_footer: + description: "The default email footer" + type: string + example: "A default email footer" + email_sending_method: + description: "The email driver to use to send email, options include default, gmail" + type: string + example: default + gmail_sending_user_id: + description: "The hashed_id of the user account to send email from" + type: string + example: F76sd34D + email_subject_invoice: + description: "" + type: string + example: "Your Invoice Subject" + email_subject_quote: + description: "" + type: string + example: "Your Quote Subject" + email_subject_payment: + description: "" + type: string + example: "Your Payment Subject" + email_template_invoice: + description: "The full template for invoice emails" + type: string + example: "" + email_template_quote: + description: "The full template for quote emails" + type: string + example: "" + email_template_payment: + description: "The full template for payment emails" + type: string + example: "" + email_subject_reminder1: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder2: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder3: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder_endless: + description: "Email subject for endless reminders" + type: string + example: "" + email_template_reminder1: + description: "The full template for Reminder 1" + type: string + example: "" + email_template_reminder2: + description: "The full template for Reminder 2" + type: string + example: "" + email_template_reminder3: + description: "The full template for Reminder 3" + type: string + example: "" + email_template_reminder_endless: + description: "The full template for enless reminders" + type: string + example: "" + enable_portal_password: + description: "Toggles whether a password is required to log into the client portal" + type: boolean + example: true + show_accept_invoice_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + show_accept_quote_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + require_invoice_signature: + description: "Toggles whether a invoice signature is required" + type: boolean + example: true + require_quote_signature: + description: "Toggles whether a quote signature is required" + type: boolean + example: true + name: + description: "The company name" + type: string + example: "Acme Co" + company_logo: + description: "The company logo file" + type: object + example: logo.png + website: + description: "The company website URL" + type: string + example: www.acme.com + address1: + description: "The company address line 1" + type: string + example: "Suite 888" + address2: + description: "The company address line 2" + type: string + example: "5 Jimbo Way" + city: + description: "The company city" + type: string + example: Sydney + state: + description: "The company state" + type: string + example: Florisa + postal_code: + description: "The company zip/postal code" + type: string + example: "90210" + phone: + description: "The company phone" + type: string + example: 555-213-3948 + email: + description: "The company email" + type: string + example: joe@acme.co + country_id: + description: "The country ID" + type: string + example: "1" + vat_number: + description: "The company VAT/TAX ID number" + type: string + example: "32 120 377 720" + page_size: + description: "The default page size" + type: string + example: A4 + font_size: + description: "The font size" + type: number + example: "9" + primary_font: + description: "The primary font" + type: string + example: roboto + secondary_font: + description: "The secondary font" + type: string + example: roboto + hide_paid_to_date: + description: "Flags whether to hide the paid to date field" + type: boolean + example: false + embed_documents: + description: "Toggled whether to embed documents in the PDF" + type: boolean + example: false + all_pages_header: + description: "The header for the PDF" + type: boolean + example: false + all_pages_footer: + description: "The footer for the PDF" + type: boolean + example: false + document_email_attachment: + description: "Toggles whether to attach documents in the email" + type: boolean + example: false + enable_client_portal_password: + description: "Toggles password protection of the client portal" + type: boolean + example: false + enable_email_markup: + description: "Toggles the use of markdown in emails" + type: boolean + example: false + enable_client_portal_dashboard: + description: "Toggles whether the client dashboard is shown in the client portal" + type: boolean + example: false + enable_client_portal: + description: "Toggles whether the entire client portal is displayed to the client, or only the context" + type: boolean + example: false + email_template_statement: + description: "The body of the email for statements" + type: string + example: "template matter" + email_subject_statement: + description: "The subject of the email for statements" + type: string + example: "subject matter" + signature_on_pdf: + description: "Toggles whether the signature (if available) is displayed on the PDF" + type: boolean + example: false + quote_footer: + description: "The default quote footer" + type: string + example: "the quote footer" + email_subject_custom1: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 1" + email_subject_custom2: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 2" + email_subject_custom3: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 3" + email_template_custom1: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom2: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom3: + description: "Custom reminder template body" + type: string + example: "" + enable_reminder1: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder2: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder3: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + num_days_reminder1: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder2: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder3: + description: "The Reminder interval" + type: number + example: "9" + schedule_reminder1: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder2: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder3: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + late_fee_amount1: + description: "The late fee amount for reminder 1" + type: number + example: 10 + late_fee_amount2: + description: "The late fee amount for reminder 2" + type: number + example: 20 + late_fee_amount3: + description: "The late fee amount for reminder 2" + type: number + example: 100 + endless_reminder_frequency_id: + description: "The frequency id of the endless reminder" + type: string + example: "1" + client_online_payment_notification: + description: "Determines if a client should receive the notification for a online payment" + type: boolean + example: false + client_manual_payment_notification: + description: "Determines if a client should receive the notification for a manually entered payment" + type: boolean + example: false + enable_e_invoice: + description: "Determines if e-invoicing is enabled" + type: boolean + example: false + default_expense_payment_type_id: + description: "The default payment type for expenses" + type: string + example: "0" + e_invoice_type: + description: "The e-invoice type" + type: string + example: "EN16931" + mailgun_endpoint: + description: "The mailgun endpoint - used to determine whether US or EU endpoints are used" + type: string + example: "api.mailgun.net or api.eu.mailgun.net" + client_initiated_payments: + description: "Determines if clients can initiate payments directly from the client portal" + type: boolean + example: false + client_initiated_payments_minimum: + description: "The minimum amount a client can pay" + type: number + example: 10 + sync_invoice_quote_columns: + description: "Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns" + type: boolean + example: false + show_task_item_description: + description: "Determines if the task item description is shown on the invoice" + type: boolean + example: false + allow_billable_task_items: + description: "Determines if task items can be marked as billable" + type: boolean + example: false + accept_client_input_quote_approval: + description: "Determines if clients can approve quotes and also pass through a PO Number reference" + type: boolean + example: false + custom_sending_email: + description: "When using Mailgun or Postmark, the FROM email address can be customized using this setting." + type: string + example: "bob@gmail.com" + show_paid_stamp: + description: "Determines if the PAID stamp is shown on the invoice" + type: boolean + example: false + show_shipping_address: + description: "Determines if the shipping address is shown on the invoice" + type: boolean + example: false + company_logo_size: + description: "The size of the company logo on the PDF - percentage value between 0 and 100" + type: number + example: 100 + show_email_footer: + description: "Determines if the email footer is shown on emails" + type: boolean + example: false + email_alignment: + description: "The alignment of the email body text, options include left / center / right" + type: string + example: "left" + auto_bill_standard_invoices: + description: "Determines if standard invoices are automatically billed when they are created or due" + type: boolean + example: false + postmark_secret: + description: "The Postmark secret API key" + type: string + example: "123456" + mailgun_secret: + description: "The Mailgun secret API key" + type: string + example: "123456" + mailgun_domain: + description: "The Mailgun domain" + type: string + example: "sandbox123456.mailgun.org" + send_email_on_mark_paid: + description: "Determines if an email is sent when an invoice is marked as paid" + type: boolean + example: false + vendor_portal_enable_uploads: + description: "Determines if vendors can upload files to the portal" + type: boolean + example: false + besr_id: + description: "The BESR ID" + type: string + example: "123456" + qr_iban: + description: "The IBAN for the QR code" + type: string + example: "CH123456" + email_subject_purchase_order: + description: "The email subject for purchase orders" + type: string + example: "Purchase Order" + email_template_purchase_order: + description: "The email template for purchase orders" + type: string + example: "Please see attached your purchase order." + require_purchase_order_signature: + description: "Determines if a signature is required on purchase orders" + type: boolean + example: false + purchase_order_public_notes: + description: "The public notes for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_terms: + description: "The terms for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_footer: + description: "The footer for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_design_id: + description: "The design id for purchase orders" + type: string + example: "hd677df" + purchase_order_number_pattern: + description: "The pattern for purchase order numbers" + type: string + example: "PO-000000" + purchase_order_number_counter: + description: "The counter for purchase order numbers" + type: number + example: 1 + page_numbering_alignment: + description: "The alignment for page numbering: options include left / center / right" + type: string + example: "left" + page_numbering: + description: "Determines if page numbering is enabled on Document PDFs" + type: boolean + example: false + auto_archive_invoice_cancelled: + description: "Determines if invoices are automatically archived when they are cancelled" + type: boolean + example: false + email_from_name: + description: "The FROM name for emails when using Custom emailers" + type: string + example: "Bob Smith" + show_all_tasks_client_portal: + description: "Determines if all tasks are shown on the client portal" + type: boolean + example: false + entity_send_time: + description: "The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24" + type: integer + example: 9 + shared_invoice_credit_counter: + description: "Determines if the invoice and credit counter are shared" + type: boolean + example: false + reply_to_name: + description: "The reply to name for emails" + type: string + example: "Bob Smith" + hide_empty_columns_on_pdf: + description: "Determines if empty columns are hidden on PDFs" + type: boolean + example: false + enable_reminder_endless: + description: "Determines if endless reminders are enabled" + type: boolean + example: false + use_credits_payment: + description: "Determines if credits can be used as a payment method" + type: boolean + example: false + recurring_invoice_number_pattern: + description: "The pattern for recurring invoice numbers" + type: string + example: "R-000000" + recurring_invoice_number_counter: + description: "The counter for recurring invoice numbers" + type: number + example: 1 + client_portal_under_payment_minimum: + description: "The minimum payment payment" + type: number + example: 10 + auto_bill_date: + description: "Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))" + type: string + example: "on_send_date" + primary_color: + description: "The primary color for the client portal / document highlights" + type: string + example: "#ffffff" + secondary_color: + description: "The secondary color for the client portal / document highlights" + type: string + example: "#ffffff" + client_portal_allow_under_payment: + description: "Determines if clients can pay invoices under the invoice amount due" + type: boolean + example: false + client_portal_allow_over_payment: + description: "Determines if clients can pay invoices over the invoice amount" + type: boolean + example: false + auto_bill: + description: "Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing" + type: string + example: "off" + client_portal_terms: + description: "The terms which are displayed on the client portal" + type: string + example: "Please see attached your invoice." + client_portal_privacy_policy: + description: "The privacy policy which is displayed on the client portal" + type: string + example: "These are the terms of use for using the client portal." + client_can_register: + description: "Determines if clients can register on the client portal" + type: boolean + example: false + portal_design_id: + description: "The design id for the client portal" + type: string + example: "hd677df" + late_fee_endless_percent: + description: "The late fee percentage for endless late fees" + type: number + example: 10 + late_fee_endless_amount: + description: "The late fee amount for endless late fees" + type: number + example: 10 + auto_email_invoice: + description: "Determines if invoices are automatically emailed when they are created" + type: boolean + example: false + email_signature: + description: "The email signature for emails" + type: string + example: "Bob Smith" + type: object + Product: + type: object + properties: + id: + type: string + description: "The hashed product ID." + example: eP01N + readOnly: true + company_id: + type: string + description: "The hashed ID of the company that owns this product." + example: eP01N + readOnly: true + user_id: + type: string + description: "The hashed ID of the user that created this product." + example: n30m4 + readOnly: true + assigned_user_id: + type: string + description: "The hashed ID of the user assigned to this product." + example: pR0j3 + project_id: + type: string + description: "The hashed ID of the project that this product is associated with." + example: pR0j3 + vendor_id: + type: string + description: "The hashed ID of the vendor that this product is associated with." + example: pR0j3 + custom_value1: + type: string + description: "Custom value field 1." + example: "Custom value 1" + custom_value2: + type: string + description: "Custom value field 2." + example: "Custom value 2" + custom_value3: + type: string + description: "Custom value field 3." + example: "Custom value 3" + custom_value4: + type: string + description: "Custom value field 4." + example: "Custom value 4" + product_key: + type: string + description: "The product key." + example: "1234" + notes: + type: string + description: "Notes about the product." + example: "These are some notes about the product." + cost: + type: number + format: double + description: "The cost of the product. (Your purchase price for this product)" + example: 10.0 + price: + type: number + format: double + description: "The price of the product that you are charging." + example: 20.0 + quantity: + type: number + format: double + description: "The quantity of the product. (used as a default)" + example: 5.0 + tax_name1: + type: string + description: "The name of tax 1." + example: "Tax 1" + tax_rate1: + type: number + format: double + description: "The rate of tax 1." + example: 10.0 + tax_name2: + type: string + description: "The name of tax 2." + example: "Tax 2" + tax_rate2: + type: number + format: double + description: "The rate of tax 2." + example: 5.0 + tax_name3: + type: string + description: "The name of tax 3." + example: "Tax 3" + tax_rate3: + type: number + format: double + description: "The rate of tax 3." + example: 0.0 + archived_at: + type: integer + format: timestamp + description: "The timestamp when the product was archived." + example: "2022-03-18T15:00:00Z" + readOnly: true + created_at: + type: integer + format: timestamp + description: "The timestamp when the product was created." + example: "2022-03-18T15:00:00Z" + readOnly: true + updated_at: + description: Timestamp + type: integer + format: timestamp + example: "2022-03-18T12:34:56.789Z" + readOnly: true + is_deleted: + type: boolean + description: "Boolean flag determining if the product has been deleted" + example: false + readOnly: true + in_stock_quantity: + type: integer + format: int32 + description: The quantity of the product that is currently in stock + default: 0 + stock_notification: + type: boolean + description: Indicates whether stock notifications are enabled for this product + default: true + stock_notification_threshold: + type: integer + format: int32 + description: The minimum quantity threshold for which stock notifications will be triggered + default: 0 + max_quantity: + type: integer + format: int32 + description: The maximum quantity that can be ordered for this product + product_image: + type: string + description: The URL of the product image + format: uri-reference + tax_id: + type: string + default: "1" + description: | + The tax category id for this product.' + + The following constants are available (default = '1') + + ``` + PRODUCT_TYPE_PHYSICAL = '1' + PRODUCT_TYPE_SERVICE = '2' + PRODUCT_TYPE_DIGITAL = '3' + PRODUCT_TYPE_SHIPPING = '4' + PRODUCT_TYPE_EXEMPT = '5' + PRODUCT_TYPE_REDUCED_TAX = '6' + PRODUCT_TYPE_OVERRIDE_TAX = '7' + PRODUCT_TYPE_ZERO_RATED = '8' + PRODUCT_TYPE_REVERSE_TAX = '9' + ``` + example: "1" + + ClientContactRequest: + properties: + id: + description: "The hashed if of the contact" + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: "The first name of the contact" + type: string + example: John + last_name: + description: "The last name of the contact" + type: string + example: Doe + phone: + description: "The phone number of the contact" + type: string + example: 555-152-4524 + custom_value1: + description: "A Custom field value" + type: string + example: "" + custom_value2: + description: "A Custom field value" + type: string + example: "" + custom_value3: + description: "A Custom field value" + type: string + example: "" + custom_value4: + description: "A Custom field value" + type: string + example: "" + email: + description: "The email of the contact" + type: string + example: "" + password: + description: "The hashed password of the contact" + type: string + example: "*****" + send_email: + description: "Boolean value determines is this contact should receive emails" + type: boolean + example: true + type: object + ClientRequest: + required: + - contacts + - country_id + properties: + id: + description: "The unique identifier of the client" + type: string + example: Opnel5aKBz + readOnly: true + contacts: + type: array + description: "A list of contacts associated with the client" + items: + $ref: "#/components/schemas/ClientContactRequest" + name: + description: "The name of the client company or organization" + type: string + example: "Jim's Housekeeping" + website: + description: "The website URL of the client company or organization" + type: string + example: "https://www.jims-housekeeping.com" + private_notes: + description: "Notes that are only visible to the user who created the client" + type: string + example: "Client prefers email communication over phone calls" + industry_id: + description: "The unique identifier of the industry the client operates in" + type: number + example: "5" + size_id: + description: "The unique identifier for the size category of the client company or organization" + type: number + example: "2" + address1: + description: "First line of the client's address" + type: string + example: "123 Main St" + address2: + description: "Second line of the client's address, if needed" + type: string + example: "Apt 4B" + city: + description: "The city the client is located in" + type: string + example: "Beverly Hills" + state: + description: "The state, province, or locality the client is located in" + type: string + example: "California" + postal_code: + description: "The postal code or ZIP code of the client" + type: string + example: "90210" + phone: + description: "The client's phone number" + type: string + example: "555-3434-3434" + country_id: + description: "The unique identifier of the client's country" + type: number + format: integer + example: "1" + custom_value1: + description: "A custom field for storing additional information" + type: string + example: "Preferred contact: Email" + custom_value2: + description: "A custom field for storing additional information" + type: string + example: "Account manager: John Doe" + custom_value3: + description: "A custom field for storing additional information" + type: string + example: "VIP client: Yes" + custom_value4: + description: "A custom field for storing additional information" + type: string + example: "Annual contract value: $50,000" + vat_number: + description: "The client's VAT (Value Added Tax) number, if applicable" + type: string + example: "VAT123456" + id_number: + description: "A unique identification number for the client, such as a tax ID or business registration number" + type: string + number: + description: "A system-assigned unique number for the client, typically used for invoicing purposes" + type: string + example: "CL-0001" + shipping_address1: + description: "First line of the client's shipping address" + type: string + example: "5 Wallaby Way" + shipping_address2: + description: "Second line of the client's shipping address, if needed" + type: string + example: "Suite 5" + shipping_city: + description: "The city of the client's shipping address" + type: string + example: "Perth" + shipping_state: + description: "The state, province, or locality of the client's shipping address" + type: string + example: "Western Australia" + shipping_postal_code: + description: "The postal code or ZIP code of the client's shipping address" + type: string + example: "6110" + shipping_country_id: + description: "The unique identifier of the country for the client's shipping address" + type: number + format: integer + example: "4" + is_deleted: + description: "A boolean value indicating whether the client has been deleted or not" + type: boolean + example: false + readOnly: true + group_settings_id: + description: "The group settings assigned to the client" + type: string + example: Opnel5aKBz + routing_id: + description: "The routing address id for e-invoicing for this client" + type: string + example: Opnel5aKBz3489-dfkiu-2239-sdsd + is_tax_exempt: + description: "Flag which defines if the client is exempt from taxes" + type: boolean + example: false + has_valid_vat_number: + description: "Flag which defines if the client has a valid VAT number" + type: boolean + example: false + readOnly: true + classification: + description: "The classification of the client" + type: string + example: "individual" + settings: + $ref: "#/components/schemas/ClientSettings" + type: object + Error: + properties: + message: + description: "Something terrible went wrong" + type: string + example: "Unexpected error" + code: + description: "The HTTP error code, ie 5xx 4xx" + type: integer + example: "500" + type: object + BTRules: + properties: + data_key: + description: "The key to search" + type: string + example: "description,amount" + operator: + description: "The operator flag of the search" + type: string + example: ">" + value: + description: "The value to search for" + type: string + example: bob + type: object + CompanySettings: + required: + - currency_id + properties: + currency_id: + description: "The default currency id" + type: string + example: true + timezone_id: + description: "The timezone id" + type: string + example: "15" + date_format_id: + description: "The date format id" + type: string + example: "15" + military_time: + description: "Toggles 12/24 hour time" + type: boolean + example: true + language_id: + description: "The language id" + type: string + example: "1" + show_currency_code: + description: "Toggles whether the currency symbol or code is shown" + type: boolean + example: true + payment_terms: + description: "-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days" + type: integer + example: "1" + company_gateway_ids: + description: "A commad separate list of available gateways" + type: string + example: "1,2,3,4" + custom_value1: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value2: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value3: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value4: + description: "A Custom Label" + type: string + example: "Custom Label" + default_task_rate: + description: "The default task rate" + type: number + format: float + example: "10.00" + send_reminders: + description: "Toggles whether reminders are sent" + type: boolean + example: true + enable_client_portal_tasks: + description: "Show/hide the tasks panel in the client portal" + type: boolean + example: true + email_style: + description: "options include plain,light,dark,custom" + type: string + example: light + reply_to_email: + description: "The reply to email address" + type: string + example: email@gmail.com + bcc_email: + description: "A comma separate list of BCC emails" + type: string + example: "email@gmail.com, contact@gmail.com" + pdf_email_attachment: + description: "Toggles whether to attach PDF as attachment" + type: boolean + example: true + ubl_email_attachment: + description: "Toggles whether to attach UBL as attachment" + type: boolean + example: true + email_style_custom: + description: "The custom template" + type: string + example: "" + counter_number_applied: + description: "enum when the invoice number counter is set, ie when_saved, when_sent, when_paid" + type: string + example: when_sent + quote_number_applied: + description: "enum when the quote number counter is set, ie when_saved, when_sent" + type: string + example: when_sent + custom_message_dashboard: + description: "A custom message which is displayed on the dashboard" + type: string + example: "Please pay invoices immediately" + custom_message_unpaid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a unpaid invoice." + type: string + example: "Please pay invoices immediately" + custom_message_paid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a paid invoice." + type: string + example: "Thanks for paying this invoice!" + custom_message_unapproved_quote: + description: "A custom message which is displayed in the client portal when a client is viewing a unapproved quote." + type: string + example: "Please approve quote" + lock_invoices: + description: "Toggles whether invoices are locked once sent and cannot be modified further" + type: boolean + example: true + auto_archive_invoice: + description: "Toggles whether a invoice is archived immediately following payment" + type: boolean + example: true + auto_archive_quote: + description: "Toggles whether a quote is archived after being converted to a invoice" + type: boolean + example: true + auto_convert_quote: + description: "Toggles whether a quote is converted to a invoice when approved" + type: boolean + example: true + inclusive_taxes: + description: "Boolean flag determining whether inclusive or exclusive taxes are used" + type: boolean + example: true + translations: + description: "JSON payload of customized translations" + type: object + example: "" + task_number_pattern: + description: "Allows customisation of the task number pattern" + type: string + example: "{$year}-{$counter}" + task_number_counter: + description: "The incrementing counter for tasks" + type: integer + example: "1" + reminder_send_time: + description: "Time from UTC +0 when the email will be sent to the client" + type: integer + example: "32400" + expense_number_pattern: + description: "Allows customisation of the expense number pattern" + type: string + example: "{$year}-{$counter}" + expense_number_counter: + description: "The incrementing counter for expenses" + type: integer + example: "1" + vendor_number_pattern: + description: "Allows customisation of the vendor number pattern" + type: string + example: "{$year}-{$counter}" + vendor_number_counter: + description: "The incrementing counter for vendors" + type: integer + example: "1" + ticket_number_pattern: + description: "Allows customisation of the ticket number pattern" + type: string + example: "{$year}-{$counter}" + ticket_number_counter: + description: "The incrementing counter for tickets" + type: integer + example: "1" + payment_number_pattern: + description: "Allows customisation of the payment number pattern" + type: string + example: "{$year}-{$counter}" + payment_number_counter: + description: "The incrementing counter for payments" + type: integer + example: "1" + invoice_number_pattern: + description: "Allows customisation of the invoice number pattern" + type: string + example: "{$year}-{$counter}" + invoice_number_counter: + description: "The incrementing counter for invoices" + type: integer + example: "1" + quote_number_pattern: + description: "Allows customisation of the quote number pattern" + type: string + example: "{$year}-{$counter}" + quote_number_counter: + description: "The incrementing counter for quotes" + type: integer + example: "1" + client_number_pattern: + description: "Allows customisation of the client number pattern" + type: string + example: "{$year}-{$counter}" + client_number_counter: + description: "The incrementing counter for clients" + type: integer + example: "1" + credit_number_pattern: + description: "Allows customisation of the credit number pattern" + type: string + example: "{$year}-{$counter}" + credit_number_counter: + description: "The incrementing counter for credits" + type: integer + example: "1" + recurring_invoice_number_prefix: + description: "This string is prepended to the recurring invoice number" + type: string + example: R + reset_counter_frequency_id: + description: "CONSTANT which is used to apply the frequency which the counters are reset" + type: integer + example: "1" + reset_counter_date: + description: "The explicit date which is used to reset counters" + type: string + example: "2019-01-01" + counter_padding: + description: "Pads the counter with leading zeros" + type: integer + example: "1" + shared_invoice_quote_counter: + description: "Flags whether to share the counter for invoices and quotes" + type: boolean + example: true + update_products: + description: "Determines if client fields are updated from third party APIs" + type: boolean + example: true + convert_products: + description: "" + type: boolean + example: true + fill_products: + description: "Automatically fill products based on product_key" + type: boolean + example: true + invoice_terms: + description: "The default invoice terms" + type: string + example: "Invoice Terms are..." + quote_terms: + description: "The default quote terms" + type: string + example: "Quote Terms are..." + invoice_taxes: + description: "Taxes can be applied to the invoice" + type: number + example: "1" + invoice_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + quote_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + invoice_footer: + description: "The default invoice footer" + type: string + example: "1" + invoice_labels: + description: "JSON string of invoice labels" + type: string + example: "1" + tax_rate1: + description: "The tax rate (float)" + type: number + example: "10" + tax_name1: + description: "The tax name" + type: string + example: GST + tax_rate2: + description: "The tax rate (float)" + type: number + example: "10" + tax_name2: + description: "The tax name" + type: string + example: GST + tax_rate3: + description: "The tax rate (float)" + type: number + example: "10" + tax_name3: + description: "The tax name" + type: string + example: GST + payment_type_id: + description: "The default payment type id" + type: string + example: "1" + custom_fields: + description: "JSON string of custom fields" + type: string + example: "{}" + email_footer: + description: "The default email footer" + type: string + example: "A default email footer" + email_sending_method: + description: "The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, client_brevo, office365" + type: string + example: default + gmail_sending_user_id: + description: "The hashed_id of the user account to send email from" + type: string + example: F76sd34D + email_subject_invoice: + description: "" + type: string + example: "Your Invoice Subject" + email_subject_quote: + description: "" + type: string + example: "Your Quote Subject" + email_subject_payment: + description: "" + type: string + example: "Your Payment Subject" + email_template_invoice: + description: "The full template for invoice emails" + type: string + example: "" + email_template_quote: + description: "The full template for quote emails" + type: string + example: "" + email_template_payment: + description: "The full template for payment emails" + type: string + example: "" + email_subject_reminder1: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder2: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder3: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder_endless: + description: "Email subject for endless reminders" + type: string + example: "" + email_template_reminder1: + description: "The full template for Reminder 1" + type: string + example: "" + email_template_reminder2: + description: "The full template for Reminder 2" + type: string + example: "" + email_template_reminder3: + description: "The full template for Reminder 3" + type: string + example: "" + email_template_reminder_endless: + description: "The full template for enless reminders" + type: string + example: "" + enable_portal_password: + description: "Toggles whether a password is required to log into the client portal" + type: boolean + example: true + show_accept_invoice_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + show_accept_quote_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + require_invoice_signature: + description: "Toggles whether a invoice signature is required" + type: boolean + example: true + require_quote_signature: + description: "Toggles whether a quote signature is required" + type: boolean + example: true + name: + description: "The company name" + type: string + example: "Acme Co" + company_logo: + description: "The company logo file" + type: object + example: logo.png + website: + description: "The company website URL" + type: string + example: www.acme.com + address1: + description: "The company address line 1" + type: string + example: "Suite 888" + address2: + description: "The company address line 2" + type: string + example: "5 Jimbo Way" + city: + description: "The company city" + type: string + example: Sydney + state: + description: "The company state" + type: string + example: Florisa + postal_code: + description: "The company zip/postal code" + type: string + example: "90210" + phone: + description: "The company phone" + type: string + example: 555-213-3948 + email: + description: "The company email" + type: string + example: joe@acme.co + country_id: + description: "The country ID" + type: string + example: "1" + vat_number: + description: "The company VAT/TAX ID number" + type: string + example: "32 120 377 720" + page_size: + description: "The default page size" + type: string + example: A4 + font_size: + description: "The font size" + type: number + example: "9" + primary_font: + description: "The primary font" + type: string + example: roboto + secondary_font: + description: "The secondary font" + type: string + example: roboto + hide_paid_to_date: + description: "Flags whether to hide the paid to date field" + type: boolean + example: false + embed_documents: + description: "Toggled whether to embed documents in the PDF" + type: boolean + example: false + all_pages_header: + description: "The header for the PDF" + type: boolean + example: false + all_pages_footer: + description: "The footer for the PDF" + type: boolean + example: false + document_email_attachment: + description: "Toggles whether to attach documents in the email" + type: boolean + example: false + enable_client_portal_password: + description: "Toggles password protection of the client portal" + type: boolean + example: false + enable_email_markup: + description: "Toggles the use of markdown in emails" + type: boolean + example: false + enable_client_portal_dashboard: + description: "Toggles whether the client dashboard is shown in the client portal" + type: boolean + example: false + enable_client_portal: + description: "Toggles whether the entire client portal is displayed to the client, or only the context" + type: boolean + example: false + email_template_statement: + description: "The body of the email for statements" + type: string + example: "template matter" + email_subject_statement: + description: "The subject of the email for statements" + type: string + example: "subject matter" + signature_on_pdf: + description: "Toggles whether the signature (if available) is displayed on the PDF" + type: boolean + example: false + quote_footer: + description: "The default quote footer" + type: string + example: "the quote footer" + email_subject_custom1: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 1" + email_subject_custom2: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 2" + email_subject_custom3: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 3" + email_template_custom1: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom2: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom3: + description: "Custom reminder template body" + type: string + example: "" + enable_reminder1: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder2: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder3: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + num_days_reminder1: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder2: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder3: + description: "The Reminder interval" + type: number + example: "9" + schedule_reminder1: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder2: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder3: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + late_fee_amount1: + description: "The late fee amount for reminder 1" + type: number + example: 10 + late_fee_amount2: + description: "The late fee amount for reminder 2" + type: number + example: 20 + late_fee_amount3: + description: "The late fee amount for reminder 2" + type: number + example: 100 + endless_reminder_frequency_id: + description: "The frequency id of the endless reminder" + type: string + example: "1" + client_online_payment_notification: + description: "Determines if a client should receive the notification for a online payment" + type: boolean + example: false + client_manual_payment_notification: + description: "Determines if a client should receive the notification for a manually entered payment" + type: boolean + example: false + enable_e_invoice: + description: "Determines if e-invoicing is enabled" + type: boolean + example: false + default_expense_payment_type_id: + description: "The default payment type for expenses" + type: string + example: "0" + e_invoice_type: + description: "The e-invoice type" + type: string + example: "EN16931" + mailgun_endpoint: + description: "The mailgun endpoint - used to determine whether US or EU endpoints are used" + type: string + example: "api.mailgun.net or api.eu.mailgun.net" + client_initiated_payments: + description: "Determines if clients can initiate payments directly from the client portal" + type: boolean + example: false + client_initiated_payments_minimum: + description: "The minimum amount a client can pay" + type: number + example: 10 + sync_invoice_quote_columns: + description: "Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns" + type: boolean + example: false + show_task_item_description: + description: "Determines if the task item description is shown on the invoice" + type: boolean + example: false + allow_billable_task_items: + description: "Determines if task items can be marked as billable" + type: boolean + example: false + accept_client_input_quote_approval: + description: "Determines if clients can approve quotes and also pass through a PO Number reference" + type: boolean + example: false + custom_sending_email: + description: "When using Mailgun or Postmark, the FROM email address can be customized using this setting." + type: string + example: "bob@gmail.com" + show_paid_stamp: + description: "Determines if the PAID stamp is shown on the invoice" + type: boolean + example: false + show_shipping_address: + description: "Determines if the shipping address is shown on the invoice" + type: boolean + example: false + company_logo_size: + description: "The size of the company logo on the PDF - percentage value between 0 and 100" + type: number + example: 100 + show_email_footer: + description: "Determines if the email footer is shown on emails" + type: boolean + example: false + email_alignment: + description: "The alignment of the email body text, options include left / center / right" + type: string + example: "left" + auto_bill_standard_invoices: + description: "Determines if standard invoices are automatically billed when they are created or due" + type: boolean + example: false + postmark_secret: + description: "The Postmark secret API key" + type: string + example: "123456" + mailgun_secret: + description: "The Mailgun secret API key" + type: string + example: "123456" + mailgun_domain: + description: "The Mailgun domain" + type: string + example: "sandbox123456.mailgun.org" + send_email_on_mark_paid: + description: "Determines if an email is sent when an invoice is marked as paid" + type: boolean + example: false + vendor_portal_enable_uploads: + description: "Determines if vendors can upload files to the portal" + type: boolean + example: false + besr_id: + description: "The BESR ID" + type: string + example: "123456" + qr_iban: + description: "The IBAN for the QR code" + type: string + example: "CH123456" + email_subject_purchase_order: + description: "The email subject for purchase orders" + type: string + example: "Purchase Order" + email_template_purchase_order: + description: "The email template for purchase orders" + type: string + example: "Please see attached your purchase order." + require_purchase_order_signature: + description: "Determines if a signature is required on purchase orders" + type: boolean + example: false + purchase_order_public_notes: + description: "The public notes for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_terms: + description: "The terms for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_footer: + description: "The footer for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_design_id: + description: "The design id for purchase orders" + type: string + example: "hd677df" + purchase_order_number_pattern: + description: "The pattern for purchase order numbers" + type: string + example: "PO-000000" + purchase_order_number_counter: + description: "The counter for purchase order numbers" + type: number + example: 1 + page_numbering_alignment: + description: "The alignment for page numbering: options include left / center / right" + type: string + example: "left" + page_numbering: + description: "Determines if page numbering is enabled on Document PDFs" + type: boolean + example: false + auto_archive_invoice_cancelled: + description: "Determines if invoices are automatically archived when they are cancelled" + type: boolean + example: false + email_from_name: + description: "The FROM name for emails when using Custom emailers" + type: string + example: "Bob Smith" + show_all_tasks_client_portal: + description: "Determines if all tasks are shown on the client portal" + type: boolean + example: false + entity_send_time: + description: "The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24" + type: integer + example: 9 + shared_invoice_credit_counter: + description: "Determines if the invoice and credit counter are shared" + type: boolean + example: false + reply_to_name: + description: "The reply to name for emails" + type: string + example: "Bob Smith" + hide_empty_columns_on_pdf: + description: "Determines if empty columns are hidden on PDFs" + type: boolean + example: false + enable_reminder_endless: + description: "Determines if endless reminders are enabled" + type: boolean + example: false + use_credits_payment: + description: "Determines if credits can be used as a payment method" + type: boolean + example: false + recurring_invoice_number_pattern: + description: "The pattern for recurring invoice numbers" + type: string + example: "R-000000" + recurring_invoice_number_counter: + description: "The counter for recurring invoice numbers" + type: number + example: 1 + client_portal_under_payment_minimum: + description: "The minimum payment payment" + type: number + example: 10 + auto_bill_date: + description: "Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))" + type: string + example: "on_send_date" + primary_color: + description: "The primary color for the client portal / document highlights" + type: string + example: "#ffffff" + secondary_color: + description: "The secondary color for the client portal / document highlights" + type: string + example: "#ffffff" + client_portal_allow_under_payment: + description: "Determines if clients can pay invoices under the invoice amount due" + type: boolean + example: false + client_portal_allow_over_payment: + description: "Determines if clients can pay invoices over the invoice amount" + type: boolean + example: false + auto_bill: + description: "Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing" + type: string + example: "off" + client_portal_terms: + description: "The terms which are displayed on the client portal" + type: string + example: "Please see attached your invoice." + client_portal_privacy_policy: + description: "The privacy policy which is displayed on the client portal" + type: string + example: "These are the terms of use for using the client portal." + client_can_register: + description: "Determines if clients can register on the client portal" + type: boolean + example: false + portal_design_id: + description: "The design id for the client portal" + type: string + example: "hd677df" + late_fee_endless_percent: + description: "The late fee percentage for endless late fees" + type: number + example: 10 + late_fee_endless_amount: + description: "The late fee amount for endless late fees" + type: number + example: 10 + auto_email_invoice: + description: "Determines if invoices are automatically emailed when they are created" + type: boolean + example: false + email_signature: + description: "The email signature for emails" + type: string + example: "Bob Smith" + classification: + description: "The classification for the company" + type: string + example: "individual" + type: object + ClientContact: + properties: + id: + description: "The hashed if of the contact" + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: "The hashed id of the user who created the contact" + type: string + example: Opnel5aKBz + readOnly: true + company_id: + description: "The hashed id of the company" + type: string + example: Opnel5aKBz + readOnly: true + client_id: + description: "The hashed id of the client" + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: "The first name of the contact" + type: string + example: John + last_name: + description: "The last name of the contact" + type: string + example: Doe + phone: + description: "The phone number of the contact" + type: string + example: 555-152-4524 + custom_value1: + description: "A Custom field value" + type: string + example: "" + custom_value2: + description: "A Custom field value" + type: string + example: "" + custom_value3: + description: "A Custom field value" + type: string + example: "" + custom_value4: + description: "A Custom field value" + type: string + example: "" + email: + description: "The email of the contact" + type: string + example: "" + accepted_terms_version: + description: "The terms of service which the contact has accpeted" + type: string + example: "A long set of ToS" + readOnly: true + password: + description: "The hashed password of the contact" + type: string + example: "*****" + confirmation_code: + description: "The confirmation code used to authenticate the contacts email address" + type: string + example: 333-sdjkh34gbasd + readOnly: true + token: + description: "A uuid based token." + type: string + example: 333-sdjkh34gbasd + readOnly: true + contact_key: + description: "A unique identifier for the contact" + type: string + example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a + readOnly: true + is_primary: + description: "Defines is this contact is the primary contact for the client" + type: boolean + example: true + confirmed: + description: "Boolean value confirms the user has confirmed their account." + type: boolean + example: true + is_locked: + description: "Boolean value defines if the contact has been locked out." + type: boolean + example: true + send_email: + description: "Boolean value determines is this contact should receive emails" + type: boolean + example: true + failed_logins: + description: "The number of failed logins the contact has had" + type: number + format: integer + example: "3" + readOnly: true + email_verified_at: + description: "The date which the contact confirmed their email" + type: number + format: integer + example: "134341234234" + readOnly: true + last_login: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + deleted_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + readOnly: true + type: object + + FeesAndLimits: + properties: + min_limit: + description: "The minimum amount accepted for this gateway" + type: string + example: "2" + max_limit: + description: "The maximum amount accepted for this gateway" + type: string + example: "2" + fee_amount: + description: "The gateway fee amount" + type: number + format: float + example: "2.0" + fee_percent: + description: "The gateway fee percentage" + type: number + format: float + example: "2.0" + fee_tax_name1: + description: "Fee tax name" + type: string + example: GST + fee_tax_name2: + description: "Fee tax name" + type: string + example: VAT + fee_tax_name3: + description: "Fee tax name" + type: string + example: "CA Sales Tax" + fee_tax_rate1: + description: "The tax rate" + type: number + format: float + example: "10.0" + fee_tax_rate2: + description: "The tax rate" + type: number + format: float + example: "17.5" + fee_tax_rate3: + description: "The tax rate" + type: number + format: float + example: "25.0" + fee_cap: + description: "If set the fee amount will be no higher than this amount" + type: number + format: float + example: "2.0" + adjust_fee_percent: + description: "Adjusts the fee to match the exact gateway fee." + type: boolean + example: true + type: object + Account: + properties: + id: + description: "The account hashed id" + type: string + example: AS3df3A + account_sms_verified: + description: "Boolean flag if the account has been verified by sms" + type: string + example: true + type: object + BankTransactionRule: + properties: + id: + description: "The bank transaction rules hashed id" + type: string + example: AS3df3A + company_id: + description: "The company hashed id" + type: string + example: AS3df3A + user_id: + description: "The user hashed id" + type: string + example: AS3df3A + name: + description: "The name of the transaction" + type: string + example: "Rule 1" + rules: + description: "A mapped collection of the sub rules for the BankTransactionRule" + type: array + items: + $ref: "#/components/schemas/BTRules" + auto_convert: + description: "Flags whether the rule converts the transaction automatically" + type: boolean + example: true + matches_on_all: + description: "Flags whether all subrules are required for the match" + type: boolean + example: true + applies_to: + description: "Flags whether the rule applies to a CREDIT or DEBIT" + type: string + example: CREDIT + client_id: + description: "The client hashed id" + type: string + example: AS3df3A + vendor_id: + description: "The vendor hashed id" + type: string + example: AS3df3A + category_id: + description: "The category hashed id" + type: string + example: AS3df3A + type: object + CompanyToken: + properties: + name: + description: "The token name" + type: string + example: "Token Name" + token: + description: "The token value" + type: string + example: AS3df3jUUH765fhfd9KJuidj3JShjA + is_system: + description: "Determines whether the token is created by the system rather than a user" + type: boolean + example: "true" + type: object + CompanyUser: + properties: + permissions: + description: "The company user permissions" + type: string + example: "[create_invoice]" + settings: + description: "Settings that are used for the frontend applications to store user preferences / metadata" + type: object + example: "json object" + react_settings: + description: "Dedicated settings object for the react web application" + type: object' + example: "json object" + is_owner: + description: "Determines whether the user owns this company" + type: boolean + example: true + is_admin: + description: "Determines whether the user is the admin of this company" + type: boolean + example: true + is_locked: + description: "Determines whether the users access to this company has been locked" + type: boolean + example: true + updated_at: + description: "The last time the record was modified, format Unix Timestamp" + type: integer + example: "1231232312321" + deleted_at: + description: "Timestamp when the user was archived, format Unix Timestamp" + type: integer + example: "12312312321" + account: + $ref: "#/components/schemas/Account" + company: + $ref: "#/components/schemas/Company" + user: + $ref: "#/components/schemas/User" + token: + $ref: "#/components/schemas/CompanyToken" + type: object + InvoiceInvitationRequest: + required: + - client_contact_id + properties: + id: + description: "The entity invitation hashed id" + type: string + example: Opnel5aKBz + readOnly: true + client_contact_id: + description: "The client contact hashed id" + type: string + example: Opnel5aKBz + key: + description: "The invitation key" + type: string + example: Opnel5aKBz4343343566236gvbb + readOnly: true + link: + description: "The invitation link" + type: string + example: "https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb" + readOnly: true + sent_date: + description: "The invitation sent date" + type: string + format: date-time + readOnly: true + viewed_date: + description: "The invitation viewed date" + type: string + format: date-time + readOnly: true + opened_date: + description: "The invitation opened date" + type: string + format: date-time + readOnly: true + updated_at: + description: "Timestamp" + type: number + format: integer + example: "1434342123" + readOnly: true + archived_at: + description: "Timestamp" + type: number + format: integer + example: "1434342123" + readOnly: true + email_error: + description: "The email error" + type: string + example: "The email error" + readOnly: true + email_status: + description: "The email status" + type: string + readOnly: true + + InvoiceInvitation: + properties: + id: + description: "The entity invitation hashed id" + type: string + example: Opnel5aKBz + readOnly: true + client_contact_id: + description: "The client contact hashed id" + type: string + example: Opnel5aKBz + key: + description: "The invitation key" + type: string + example: Opnel5aKBz4343343566236gvbb + readOnly: true + link: + description: "The invitation link" + type: string + example: "https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb" + readOnly: true + sent_date: + description: "The invitation sent date" + type: string + format: date-time + readOnly: true + viewed_date: + description: "The invitation viewed date" + type: string + format: date-time + readOnly: true + opened_date: + description: "The invitation opened date" + type: string + format: date-time + readOnly: true + updated_at: + description: "Timestamp" + type: number + format: integer + example: "1434342123" + readOnly: true + archived_at: + description: "Timestamp" + type: number + format: integer + example: "1434342123" + readOnly: true + email_error: + description: "The email error" + type: string + example: "The email error" + readOnly: true + email_status: + description: "The email status" + type: string + readOnly: true + + Design: + properties: + id: + description: "The design hashed id" + type: string + example: AS3df3A + name: + description: "The design name" + type: string + example: Beauty + design: + description: "The design HTML" + type: string + example: "" + is_custom: + description: "Flag to determine if the design is a custom user design" + type: boolean + example: true + is_active: + description: "Flag to determine if the design is available for use" + type: boolean + example: true + is_deleted: + description: "Flag to determine if the design is deleted" + type: boolean + example: true + created_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + updated_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + deleted_at: + description: Timestamp + type: number + format: integer + example: "134341234234" + type: object tags: - - name: login - description: | - Attempts to authenticate with the API using a email/password combination. - externalDocs: - description: "Find out more" - url: "https://invoiceninja.github.io" - - name: clients - description: | - Endpoint definitions for interacting with clients. - - name: products - description: | - Endpoint definitions for interacting with products. - - name: invoices - description: | - Endpoint definitions for interacting with invoices. - - name: Recurring Invoices - description: | - Endpoint definitions for interacting with recurring_invoices. - - name: payments - description: | - Endpoint definitions for interacting with payments. - - name: quotes - description: | - Endpoint definitions for interacting with quotes. - - name: credits - description: | - Endpoint definitions for interacting with credits. - - name: projects - description: | - Endpoint definitions for interacting with projects. - - name: tasks - description: | - Endpoint definitions for interacting with tasks. - - name: vendors - description: | - Endpoint definitions for interacting with vendors. - - name: Purchase Orders - summary: Purchase Orders - description: | - Endpoint definitions for interacting with purchase orders. - - name: expenses - description: | - Endpoint definitions for interacting with expenses. - - name: recurring_expenses - description: | - Endpoint definitions for interacting with recurring_expenses. - - name: bank_transactions - description: | - Endpoint definitions for interacting with bank transactions. - - name: reports - description: | - Endpoint definitions for interacting with reports. + - name: login + description: | + Attempts to authenticate with the API using a email/password combination. + externalDocs: + description: "Find out more" + url: "https://invoiceninja.github.io" + - name: clients + description: | + Endpoint definitions for interacting with clients. + - name: products + description: | + Endpoint definitions for interacting with products. + - name: invoices + description: | + Endpoint definitions for interacting with invoices. + - name: Recurring Invoices + description: | + Endpoint definitions for interacting with recurring_invoices. + - name: payments + description: | + Endpoint definitions for interacting with payments. + - name: quotes + description: | + Endpoint definitions for interacting with quotes. + - name: credits + description: | + Endpoint definitions for interacting with credits. + - name: projects + description: | + Endpoint definitions for interacting with projects. + - name: tasks + description: | + Endpoint definitions for interacting with tasks. + - name: vendors + description: | + Endpoint definitions for interacting with vendors. + - name: Purchase Orders + summary: Purchase Orders + description: | + Endpoint definitions for interacting with purchase orders. + - name: expenses + description: | + Endpoint definitions for interacting with expenses. + - name: recurring_expenses + description: | + Endpoint definitions for interacting with recurring_expenses. + - name: bank_transactions + description: | + Endpoint definitions for interacting with bank transactions. + - name: reports + description: | + Endpoint definitions for interacting with reports. externalDocs: - description: "https://invoiceninja.github.io" - url: "https://invoiceninja.github.io" + description: "https://invoiceninja.github.io" + url: "https://invoiceninja.github.io" security: - - ApiKeyAuth: [] + - ApiKeyAuth: [] From 6a62be371519f5ad75bc1c4d7315b32671586d66 Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 21 Dec 2023 18:49:04 +0100 Subject: [PATCH 03/92] wip: adding support for brevo webhook --- app/Http/Controllers/BrevoController.php | 68 ++++ app/Jobs/Brevo/ProcessBrevoWebhook.php | 405 +++++++++++++++++++++++ app/Providers/AppServiceProvider.php | 22 +- app/Services/Email/Email.php | 4 - routes/api.php | 6 +- 5 files changed, 488 insertions(+), 17 deletions(-) create mode 100644 app/Http/Controllers/BrevoController.php create mode 100644 app/Jobs/Brevo/ProcessBrevoWebhook.php diff --git a/app/Http/Controllers/BrevoController.php b/app/Http/Controllers/BrevoController.php new file mode 100644 index 000000000000..25c328484363 --- /dev/null +++ b/app/Http/Controllers/BrevoController.php @@ -0,0 +1,68 @@ +all())->delay(10); + + return response()->json(['message' => 'Success'], 200); + } +} diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php new file mode 100644 index 000000000000..b8d8f705d216 --- /dev/null +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -0,0 +1,405 @@ + '', + 'subject' => 'Message not found.', + 'entity' => '', + 'entity_id' => '', + 'events' => [], + ]; + + /** + * Create a new job instance. + * + */ + public function __construct(private array $request) + { + } + + private function getSystemLog(string $message_id): ?SystemLog + { + return SystemLog::query() + ->where('company_id', $this->invitation->company_id) + ->where('type_id', SystemLog::TYPE_WEBHOOK_RESPONSE) + ->whereJsonContains('log', ['message-id' => $message_id]) + ->orderBy('id', 'desc') + ->first(); + + } + + private function updateSystemLog(SystemLog $system_log, array $data): void + { + $system_log->log = $data; + $system_log->save(); + } + + /** + * Execute the job. + * + * + * @return void + */ + public function handle() + { + MultiDB::findAndSetDbByCompanyKey($this->request['tag']); + + $this->invitation = $this->discoverInvitation($this->request['message-id']); + + if (!$this->invitation) { + return; + } + + // if (array_key_exists('Details', $this->request)) { + // $this->invitation->email_error = $this->request['Details']; + // } // no details, when error occured + + switch ($this->request['event']) { + case 'delivered': + return $this->processDelivery(); + case 'soft_bounce': + case 'hard_bounce': + case 'invalid_email': + return $this->processBounce(); + case 'spam': + return $this->processSpamComplaint(); + case 'Open': + return $this->processOpen(); + default: + # code... + break; + } + } + + // { + // "Metadata": { + // "example": "value", + // "example_2": "value" + // }, + // "RecordType": "Open", + // "FirstOpen": true, + // "Client": { + // "Name": "Chrome 35.0.1916.153", + // "Company": "Google", + // "Family": "Chrome" + // }, + // "OS": { + // "Name": "OS X 10.7 Lion", + // "Company": "Apple Computer, Inc.", + // "Family": "OS X 10" + // }, + // "Platform": "WebMail", + // "UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36", + // "ReadSeconds": 5, + // "Geo": { + // "CountryISOCode": "RS", + // "Country": "Serbia", + // "RegionISOCode": "VO", + // "Region": "Autonomna Pokrajina Vojvodina", + // "City": "Novi Sad", + // "Zip": "21000", + // "Coords": "45.2517,19.8369", + // "IP": "188.2.95.4" + // }, + // "MessageID": "00000000-0000-0000-0000-000000000000", + // "MessageStream": "outbound", + // "ReceivedAt": "2022-02-06T06:37:48Z", + // "Tag": "welcome-email", + // "Recipient": "john@example.com" + // } + + private function processOpen() + { + $this->invitation->opened_date = now(); + $this->invitation->save(); + + $data = array_merge($this->request, ['history' => $this->fetchMessage()]); + + $sl = $this->getSystemLog($this->request['message-id']); + + if ($sl) { + $this->updateSystemLog($sl, $data); + return; + } + + (new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_OPENED, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ))->handle(); + } + + // { + // "event" : "delivered", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-m-d h:i:s", + // "message-id" : "", + // "subject" : "Test subject", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } + private function processDelivery() + { + $this->invitation->email_status = 'delivered'; + $this->invitation->save(); + + $data = array_merge($this->request, ['history' => $this->fetchMessage()]); + + $sl = $this->getSystemLog($this->request['message-id']); + + if ($sl) { + $this->updateSystemLog($sl, $data); + return; + } + + (new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_DELIVERY, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ))->handle(); + } + + // { + // "event" : "soft_bounce", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "reason" : "", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } + // { + // "event" : "hard_bounce", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "reason" : "", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } + // { + // "event" : "invalid_email", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "subject" : "Test subject", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } + + private function processBounce() + { + $this->invitation->email_status = 'bounced'; + $this->invitation->save(); + + $bounce = new EmailBounce( + $this->request['tag'], + $this->request['From'], + $this->request['message-id'] + ); + + LightLogs::create($bounce)->send(); + + $data = array_merge($this->request, ['history' => $this->fetchMessage()]); + + $sl = $this->getSystemLog($this->request['message-id']); + + if ($sl) { + $this->updateSystemLog($sl, $data); + return; + } + + (new SystemLogger($data, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company))->handle(); + + // if(config('ninja.notification.slack')) + // $this->invitation->company->notification(new EmailBounceNotification($this->invitation->company->account))->ninja(); + } + + // { + // "event" : "spam", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // } + private function processSpamComplaint() + { + $this->invitation->email_status = 'spam'; + $this->invitation->save(); + + $spam = new EmailSpam( + $this->request['tag'], + $this->request['From'], + $this->request['message-id'] + ); + + LightLogs::create($spam)->send(); + + $data = array_merge($this->request, ['history' => $this->fetchMessage()]); + + $sl = $this->getSystemLog($this->request['message-id']); + + if ($sl) { + $this->updateSystemLog($sl, $data); + return; + } + + (new SystemLogger($data, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_SPAM_COMPLAINT, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company))->handle(); + + if (config('ninja.notification.slack')) { + $this->invitation->company->notification(new EmailSpamNotification($this->invitation->company->account))->ninja(); + } + } + + private function discoverInvitation($message_id) + { + $invitation = false; + + if ($invitation = InvoiceInvitation::where('message_id', $message_id)->first()) { + $this->entity = 'invoice'; + return $invitation; + } elseif ($invitation = QuoteInvitation::where('message_id', $message_id)->first()) { + $this->entity = 'quote'; + return $invitation; + } elseif ($invitation = RecurringInvoiceInvitation::where('message_id', $message_id)->first()) { + $this->entity = 'recurring_invoice'; + return $invitation; + } elseif ($invitation = CreditInvitation::where('message_id', $message_id)->first()) { + $this->entity = 'credit'; + return $invitation; + } elseif ($invitation = PurchaseOrderInvitation::where('message_id', $message_id)->first()) { + $this->entity = 'purchase_order'; + return $invitation; + } else { + return $invitation; + } + } + + public function getRawMessage(string $message_id) + { + + $Brevo = new BrevoClient(config('services.brevo.key')); + $messageDetail = $Brevo->getOutboundMessageDetails($message_id); + return $messageDetail; + + } + + + public function getBounceId(string $message_id): ?int + { + + $messageDetail = $this->getRawMessage($message_id); + + + $event = collect($messageDetail->messageevents)->first(function ($event) { + + return $event?->Details?->BounceID ?? false; + + }); + + return $event?->Details?->BounceID ?? null; + + } + + private function fetchMessage(): array + { + if (strlen($this->request['message-id']) < 1) { + return $this->default_response; + } + + try { + + $Brevo = new BrevoClient(config('services.brevo.key')); + $messageDetail = $Brevo->getOutboundMessageDetails($this->request['message-id']); + + $recipients = collect($messageDetail['recipients'])->flatten()->implode(','); + $subject = $messageDetail->subject ?? ''; + + $events = collect($messageDetail->messageevents)->map(function ($event) { + + return [ + 'bounce_id' => $event?->Details?->BounceID ?? '', + 'recipient' => $event->Recipient ?? '', + 'status' => $event->Type ?? '', + 'delivery_message' => $event->Details->DeliveryMessage ?? $event->Details->Summary ?? '', + 'server' => $event->Details->DestinationServer ?? '', + 'server_ip' => $event->Details->DestinationIP ?? '', + 'date' => \Carbon\Carbon::parse($event->ReceivedAt)->format('Y-m-d H:i:s') ?? '', + ]; + + })->toArray(); + + return [ + 'recipients' => $recipients, + 'subject' => $subject, + 'entity' => $this->entity ?? '', + 'entity_id' => $this->invitation->{$this->entity}->hashed_id ?? '', + 'events' => $events, + ]; + + } catch (\Exception $e) { + + return $this->default_response; + + } + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 1767ac11b1fb..d1d55daf8473 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -124,18 +124,18 @@ class AppServiceProvider extends ServiceProvider ) ); }); - Mailer::macro('brevo_config', function (string $key) { - // @phpstan-ignore /** @phpstan-ignore-next-line **/ - Mail::setSymfonyTransport((new BrevoTransportFactory)->create( - new Dsn( - 'brevo+api', - 'default', - $key - ) - )); + // Mailer::macro('brevo_config', function (string $key) { + // // @phpstan-ignore /** @phpstan-ignore-next-line **/ + // Mail::setSymfonyTransport((new BrevoTransportFactory)->create( + // new Dsn( + // 'brevo+api', + // 'default', + // $key + // ) + // )); - return $this; - }); + // return $this; + // }); } diff --git a/app/Services/Email/Email.php b/app/Services/Email/Email.php index 5da97944e91e..a87a853d280d 100644 --- a/app/Services/Email/Email.php +++ b/app/Services/Email/Email.php @@ -235,8 +235,6 @@ class Email implements ShouldQueue public function email() { // $this->setMailDriver(); - Log::info("mail(): " . $this->mailer); - Log::info($this->client_brevo_secret); /* Init the mailer*/ $mailer = Mail::mailer($this->mailer); @@ -461,8 +459,6 @@ class Email implements ShouldQueue */ private function setMailDriver(): self { - Log::info("E-Mail Sending Method (setMailDriver): " . $this->email_object->settings->email_sending_method); - Log::info(json_encode($this->email_object->settings)); switch ($this->email_object->settings->email_sending_method) { case 'default': $this->mailer = config('mail.default'); diff --git a/routes/api.php b/routes/api.php index 4d648054e298..0d60406a0b75 100644 --- a/routes/api.php +++ b/routes/api.php @@ -20,6 +20,7 @@ use App\Http\Controllers\BankIntegrationController; use App\Http\Controllers\BankTransactionController; use App\Http\Controllers\BankTransactionRuleController; use App\Http\Controllers\BaseController; +use App\Http\Controllers\BrevoController; use App\Http\Controllers\ChartController; use App\Http\Controllers\ClientController; use App\Http\Controllers\ClientGatewayTokenController; @@ -120,7 +121,7 @@ Route::group(['middleware' => ['throttle:api', 'api_secret_check']], function () Route::post('api/v1/oauth_login', [LoginController::class, 'oauthApiLogin']); }); -Route::group(['middleware' => ['throttle:login','api_secret_check','email_db']], function () { +Route::group(['middleware' => ['throttle:login', 'api_secret_check', 'email_db']], function () { Route::post('api/v1/login', [LoginController::class, 'apiLogin'])->name('login.submit'); Route::post('api/v1/reset_password', [ForgotPasswordController::class, 'sendResetLinkEmail']); }); @@ -324,7 +325,7 @@ Route::group(['middleware' => ['throttle:api', 'api_db', 'token_auth', 'locale'] Route::post('reports/user_sales_report', UserSalesReportController::class); Route::post('reports/preview/{hash}', ReportPreviewController::class); Route::post('exports/preview/{hash}', ReportExportController::class); - + Route::post('templates/preview/{hash}', TemplatePreviewController::class); Route::post('search', SearchController::class); @@ -414,6 +415,7 @@ Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{compa ->name('payment_notification_webhook'); Route::post('api/v1/postmark_webhook', [PostMarkController::class, 'webhook'])->middleware('throttle:1000,1'); +Route::post('api/v1/brevo_webhook', [BrevoController::class, 'webhook'])->middleware('throttle:1000,1'); Route::get('token_hash_router', [OneTimeTokenController::class, 'router'])->middleware('throttle:500,1'); Route::get('webcron', [WebCronController::class, 'index'])->middleware('throttle:100,1'); Route::post('api/v1/get_migration_account', [HostedMigrationController::class, 'getAccount'])->middleware('guest')->middleware('throttle:100,1'); From c9178a6a01a7d71bb1f394ccc712198da0109f93 Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 21 Dec 2023 19:05:21 +0100 Subject: [PATCH 04/92] adding brevo client and first changes to webhook data --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 83 ++++++++++++-------------- composer.json | 1 + composer.lock | 65 +++++++++++++++++++- 3 files changed, 102 insertions(+), 47 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index b8d8f705d216..b9c4075c2dd5 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -22,12 +22,14 @@ use App\Models\QuoteInvitation; use App\Models\RecurringInvoiceInvitation; use App\Models\SystemLog; use App\Notifications\Ninja\EmailSpamNotification; +use Brevo\Client\Configuration; +use Brevo\Client\Model\GetTransacEmailContentEvents; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Brevo\BrevoClient; +use Brevo\Client\Api\TransactionalEmailsApi; use Turbo124\Beacon\Facades\LightLogs; class ProcessBrevoWebhook implements ShouldQueue @@ -102,7 +104,8 @@ class ProcessBrevoWebhook implements ShouldQueue return $this->processBounce(); case 'spam': return $this->processSpamComplaint(); - case 'Open': + case 'unique_opened': + case 'opened': return $this->processOpen(); default: # code... @@ -111,41 +114,29 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "Metadata": { - // "example": "value", - // "example_2": "value" - // }, - // "RecordType": "Open", - // "FirstOpen": true, - // "Client": { - // "Name": "Chrome 35.0.1916.153", - // "Company": "Google", - // "Family": "Chrome" - // }, - // "OS": { - // "Name": "OS X 10.7 Lion", - // "Company": "Apple Computer, Inc.", - // "Family": "OS X 10" - // }, - // "Platform": "WebMail", - // "UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36", - // "ReadSeconds": 5, - // "Geo": { - // "CountryISOCode": "RS", - // "Country": "Serbia", - // "RegionISOCode": "VO", - // "Region": "Autonomna Pokrajina Vojvodina", - // "City": "Novi Sad", - // "Zip": "21000", - // "Coords": "45.2517,19.8369", - // "IP": "188.2.95.4" - // }, - // "MessageID": "00000000-0000-0000-0000-000000000000", - // "MessageStream": "outbound", - // "ReceivedAt": "2022-02-06T06:37:48Z", - // "Tag": "welcome-email", - // "Recipient": "john@example.com" - // } + // "event" : "unique_opened", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-m-d h:i:s", + // "message-id" : "", + // "subject" : "Test subject", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } + // { + // "event" : "opened", + // "email" : "frichris@hotmail.fr", + // "id" : 1, + // "date" : "yyyy-m-d h:i:s", + // "message-id" : "", + // "subject" : "Test subject", + // "tag" : "", + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1 + // } private function processOpen() { @@ -251,7 +242,7 @@ class ProcessBrevoWebhook implements ShouldQueue $bounce = new EmailBounce( $this->request['tag'], - $this->request['From'], + $this->request['From'], // TODO: @turbo124 is this the recipent? $this->request['message-id'] ); @@ -288,7 +279,7 @@ class ProcessBrevoWebhook implements ShouldQueue $spam = new EmailSpam( $this->request['tag'], - $this->request['From'], + $this->request['From'], // TODO $this->request['message-id'] ); @@ -337,8 +328,8 @@ class ProcessBrevoWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $Brevo = new BrevoClient(config('services.brevo.key')); - $messageDetail = $Brevo->getOutboundMessageDetails($message_id); + $Brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', config('services.brevo.key'))); + $messageDetail = $Brevo->getTransacEmailContent($message_id); return $messageDetail; } @@ -350,7 +341,7 @@ class ProcessBrevoWebhook implements ShouldQueue $messageDetail = $this->getRawMessage($message_id); - $event = collect($messageDetail->messageevents)->first(function ($event) { + $event = collect($messageDetail->getEvents())->first(function ($event) { return $event?->Details?->BounceID ?? false; @@ -360,6 +351,7 @@ class ProcessBrevoWebhook implements ShouldQueue } + // TODO private function fetchMessage(): array { if (strlen($this->request['message-id']) < 1) { @@ -368,13 +360,12 @@ class ProcessBrevoWebhook implements ShouldQueue try { - $Brevo = new BrevoClient(config('services.brevo.key')); - $messageDetail = $Brevo->getOutboundMessageDetails($this->request['message-id']); + $messageDetail = $this->getRawMessage($this->request['message-id']); $recipients = collect($messageDetail['recipients'])->flatten()->implode(','); - $subject = $messageDetail->subject ?? ''; + $subject = $messageDetail->getSubject() ?? ''; - $events = collect($messageDetail->messageevents)->map(function ($event) { + $events = collect($messageDetail->getEvents())->map(function (GetTransacEmailContentEvents $event) { return [ 'bounce_id' => $event?->Details?->BounceID ?? '', diff --git a/composer.json b/composer.json index 24f9adb861fc..0c903b661dc0 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,7 @@ "doctrine/dbal": "^3.0", "eway/eway-rapid-php": "^1.3", "fakerphp/faker": "^1.14", + "getbrevo/brevo-php": "^1.0", "gocardless/gocardless-pro": "^4.12", "google/apiclient": "^2.7", "guzzlehttp/guzzle": "^7.2", diff --git a/composer.lock b/composer.lock index 4bafa42c02d7..613e8cb93376 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ba57ee16621201bac10def4422ba9161", + "content-hash": "b6f77d8c2532d7f443899c5ed77fcf8f", "packages": [ { "name": "afosto/yaac", @@ -2431,6 +2431,69 @@ ], "time": "2023-10-12T05:21:21+00:00" }, + { + "name": "getbrevo/brevo-php", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/getbrevo/brevo-php.git", + "reference": "6c3286e62327277fd8445cddb057d44e850722c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getbrevo/brevo-php/zipball/6c3286e62327277fd8445cddb057d44e850722c0", + "reference": "6c3286e62327277fd8445cddb057d44e850722c0", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.0", + "php": ">=5.6" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.12", + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "~2.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x.x-dev" + } + }, + "autoload": { + "psr-4": { + "Brevo\\Client\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brevo Developers", + "email": "contact@brevo.com", + "homepage": "https://www.brevo.com/" + } + ], + "description": "Official Brevo provided RESTFul API V3 php library", + "homepage": "https://github.com/getbrevo/brevo-php", + "keywords": [ + "api", + "brevo", + "php", + "sdk", + "swagger" + ], + "support": { + "issues": "https://github.com/getbrevo/brevo-php/issues", + "source": "https://github.com/getbrevo/brevo-php/tree/v1.0.2" + }, + "time": "2023-07-14T10:00:50+00:00" + }, { "name": "gocardless/gocardless-pro", "version": "4.28.0", From 629c9c1b1246d63f18fffb63f4331d7fe30bbc0e Mon Sep 17 00:00:00 2001 From: paulwer Date: Fri, 22 Dec 2023 07:39:49 +0100 Subject: [PATCH 05/92] changes to WebhookHandler --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 188 ++++++++++++++++--------- 1 file changed, 122 insertions(+), 66 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index b9c4075c2dd5..9d0efbbfee0f 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -101,6 +101,7 @@ class ProcessBrevoWebhook implements ShouldQueue case 'soft_bounce': case 'hard_bounce': case 'invalid_email': + case 'blocked': return $this->processBounce(); case 'spam': return $this->processSpamComplaint(); @@ -114,29 +115,41 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "event" : "unique_opened", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-m-d h:i:s", - // "message-id" : "", - // "subject" : "Test subject", - // "tag" : "", - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1 - // } - // { - // "event" : "opened", - // "email" : "frichris@hotmail.fr", - // "id" : 1, - // "date" : "yyyy-m-d h:i:s", - // "message-id" : "", - // "subject" : "Test subject", - // "tag" : "", - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1 - // } + // "id": 948562, + // "email": "test@example.com", + // "message-id": "<202312211546.94160606300@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:34:42", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "unique_opened", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "74.125.208.8", + // "ts": 1703180082, + // "ts_epoch": 1703180082286, + // "ts_event": 1703180082, + // "link": "", + // "sender_email": "user@example.com" + // } + // { + // "id": 948562, + // "email": "test@example.com", + // "message-id": "<202312211555.14720890391@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:34:53", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "opened", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "74.125.208.8", + // "ts": 1703180093, + // "ts_epoch": 1703180093075, + // "ts_event": 1703180093, + // "link": "", + // "sender_email": "user@example.com" + // } private function processOpen() { @@ -163,17 +176,23 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "event" : "delivered", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-m-d h:i:s", - // "message-id" : "", - // "subject" : "Test subject", - // "tag" : "", - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1 - // } + // "id": 948562, + // "email": "test@example", + // "message-id": "<202312211742.12697514322@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:42:31", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "delivered", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "77.32.148.26", + // "ts_event": 1703180551, + // "ts": 1703180551, + // "reason": "sent", + // "ts_epoch": 1703180551324, + // "sender_email": "user@example.com" + // } private function processDelivery() { $this->invitation->email_status = 'delivered'; @@ -199,29 +218,41 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "event" : "soft_bounce", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-mm-dd hh:i:s", - // "message-id" : "", - // "reason" : "", - // "tag" : "", - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1 - // } - // { - // "event" : "hard_bounce", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-mm-dd hh:i:s", - // "message-id" : "", - // "reason" : "", - // "tag" : "", - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1 - // } + // "id": 948562, + // "email": "ryder36@example.net", + // "message-id": "<202312211744.55168080257@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:44:52", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "soft_bounce", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "sending_ip": "77.32.148.26", + // "ts_event": 1703180692, + // "ts": 1703180692, + // "reason": "Unable to find MX of domain example.net", + // "ts_epoch": 1703180692382, + // "sender_email": "user@example.com" + // } + // { + // "id": 948562, + // "email": "gloria46@example.com", + // "message-id": "<202312211744.57456703957@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:44:54", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "hard_bounce", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "sending_ip": "77.32.148.25", + // "ts_event": 1703180694, + // "ts": 1703180694, + // "reason": "blocked by Admin", + // "ts_epoch": 1703180694175, + // "sender_email": "user@example.com" + // } // { // "event" : "invalid_email", // "email" : "example@example.com", @@ -229,11 +260,32 @@ class ProcessBrevoWebhook implements ShouldQueue // "date" : "yyyy-mm-dd hh:i:s", // "message-id" : "", // "subject" : "Test subject", - // "tag" : "", + // "tag" : "",//json of array + // "tags": [ + // "company_key" + // ], // "sending_ip" : "xxx.xx.xxx.xx", // "ts_epoch" : 1534486682000, - // "template_id" : 1 + // "template_id" : 1, + // "sender_email": "user@example.com", // } + // { + // "id": 948562, + // "email": "neoma.langosh@example.com", + // "message-id": "<202312211745.65538701430@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:45:48", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "blocked", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "ts_event": 1703180748, + // "ts": 1703180748, + // "reason": "blocked : due to blacklist user", + // "ts_epoch": 1703180748987, + // "sender_email": "user@example.com" + // } private function processBounce() { @@ -241,8 +293,8 @@ class ProcessBrevoWebhook implements ShouldQueue $this->invitation->save(); $bounce = new EmailBounce( - $this->request['tag'], - $this->request['From'], // TODO: @turbo124 is this the recipent? + $this->request['tags'][0], + $this->request['sender_email'], // TODO: @turbo124 is this the recipent? $this->request['message-id'] ); @@ -269,8 +321,12 @@ class ProcessBrevoWebhook implements ShouldQueue // "id" : 1, // "date" : "yyyy-mm-dd hh:i:s", // "message-id" : "", - // "tag" : "", + // "tag" : "",//json of array + // "tags": [ + // "company_key" + // ], // "sending_ip" : "xxx.xx.xxx.xx", + // "sender_email": "user@example.com", // } private function processSpamComplaint() { @@ -278,8 +334,8 @@ class ProcessBrevoWebhook implements ShouldQueue $this->invitation->save(); $spam = new EmailSpam( - $this->request['tag'], - $this->request['From'], // TODO + $this->request['tags'][0], + $this->request['sender_email'], $this->request['message-id'] ); @@ -362,10 +418,10 @@ class ProcessBrevoWebhook implements ShouldQueue $messageDetail = $this->getRawMessage($this->request['message-id']); - $recipients = collect($messageDetail['recipients'])->flatten()->implode(','); + $recipients = $this->request["email"]; $subject = $messageDetail->getSubject() ?? ''; - $events = collect($messageDetail->getEvents())->map(function (GetTransacEmailContentEvents $event) { + $events = collect($messageDetail->getEvents())->map(function (GetTransacEmailContentEvents $event) { // @turbo124 event does only contain name & time property, how to handle transformation?! return [ 'bounce_id' => $event?->Details?->BounceID ?? '', From 94671fa67e61f6223bc7d65eb485b94013788062 Mon Sep 17 00:00:00 2001 From: paulwer Date: Fri, 22 Dec 2023 08:03:25 +0100 Subject: [PATCH 06/92] updated deps --- composer.json | 10 +++++----- composer.lock | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 0c903b661dc0..5c1a37c81496 100644 --- a/composer.json +++ b/composer.json @@ -92,7 +92,7 @@ "sprain/swiss-qr-bill": "^4.3", "square/square": "30.0.0.*", "stripe/stripe-php": "^12", - "symfony/brevo-mailer": "^7.0", + "symfony/brevo-mailer": "6.4", "symfony/http-client": "^6.0", "symfony/mailgun-mailer": "^6.1", "symfony/postmark-mailer": "^6.1", @@ -174,10 +174,10 @@ } }, "repositories": [ - { - "type": "vcs", - "url": "https://github.com/turbo124/apple" - } + { + "type": "vcs", + "url": "https://github.com/turbo124/apple" + } ], "minimum-stability": "dev", "prefer-stable": true diff --git a/composer.lock b/composer.lock index 613e8cb93376..73d100a20fb5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b6f77d8c2532d7f443899c5ed77fcf8f", + "content-hash": "4b12f1e3b0be21cb7f772d3c2a9d72ff", "packages": [ { "name": "afosto/yaac", @@ -10781,7 +10781,7 @@ }, { "name": "symfony/brevo-mailer", - "version": "v7.0.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/brevo-mailer.git", @@ -10830,7 +10830,7 @@ "description": "Symfony Brevo Mailer Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/brevo-mailer/tree/v7.0.0" + "source": "https://github.com/symfony/brevo-mailer/tree/v7.0.0-RC1" }, "funding": [ { From ac69a4f71724c2b9c48e45bb6ff03ad3ec8fe80f Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 28 Dec 2023 09:02:51 +0100 Subject: [PATCH 07/92] auth for webhook request with query-parameter "token" --- app/Http/Controllers/BrevoController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/BrevoController.php b/app/Http/Controllers/BrevoController.php index 25c328484363..e1dce175f485 100644 --- a/app/Http/Controllers/BrevoController.php +++ b/app/Http/Controllers/BrevoController.php @@ -61,8 +61,12 @@ class BrevoController extends BaseController */ public function webhook(Request $request) { - ProcessBrevoWebhook::dispatch($request->all())->delay(10); + if ($request->has('token') && $request->get('token') == config('services.brevo.key')) { + ProcessBrevoWebhook::dispatch($request->all())->delay(10); - return response()->json(['message' => 'Success'], 200); + return response()->json(['message' => 'Success'], 200); + } + + return response()->json(['message' => 'Unauthorized'], 403); } } From 3c525a38b60cebf050a8e2113975fcb9586b6a4e Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 28 Dec 2023 09:24:32 +0100 Subject: [PATCH 08/92] updates --- app/Http/Controllers/BrevoController.php | 10 +- app/Jobs/Brevo/ProcessBrevoWebhook.php | 279 ++++++++++++----------- 2 files changed, 154 insertions(+), 135 deletions(-) diff --git a/app/Http/Controllers/BrevoController.php b/app/Http/Controllers/BrevoController.php index e1dce175f485..10950bdc6cbb 100644 --- a/app/Http/Controllers/BrevoController.php +++ b/app/Http/Controllers/BrevoController.php @@ -61,12 +61,12 @@ class BrevoController extends BaseController */ public function webhook(Request $request) { - if ($request->has('token') && $request->get('token') == config('services.brevo.key')) { - ProcessBrevoWebhook::dispatch($request->all())->delay(10); + // if ($request->has('token') && $request->get('token') == config('services.brevo.key')) { + ProcessBrevoWebhook::dispatch($request->all())->delay(10); - return response()->json(['message' => 'Success'], 200); - } + return response()->json(['message' => 'Success'], 200); + // } - return response()->json(['message' => 'Unauthorized'], 403); + // return response()->json(['message' => 'Unauthorized'], 403); } } diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 9d0efbbfee0f..70d96d57420b 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -83,7 +83,7 @@ class ProcessBrevoWebhook implements ShouldQueue */ public function handle() { - MultiDB::findAndSetDbByCompanyKey($this->request['tag']); + MultiDB::findAndSetDbByCompanyKey($this->request['tags'][0]); $this->invitation = $this->discoverInvitation($this->request['message-id']); @@ -107,6 +107,7 @@ class ProcessBrevoWebhook implements ShouldQueue return $this->processSpamComplaint(); case 'unique_opened': case 'opened': + case 'click': return $this->processOpen(); default: # code... @@ -115,41 +116,59 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "id": 948562, - // "email": "test@example.com", - // "message-id": "<202312211546.94160606300@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:34:42", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "unique_opened", - // "subject": "Reminder: Invoice 0002 from Untitled Company", - // "sending_ip": "74.125.208.8", - // "ts": 1703180082, - // "ts_epoch": 1703180082286, - // "ts_event": 1703180082, - // "link": "", - // "sender_email": "user@example.com" - // } + // "id": 948562, + // "email": "test@example.com", + // "message-id": "<202312211546.94160606300@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:34:42", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "unique_opened", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "74.125.208.8", + // "ts": 1703180082, + // "ts_epoch": 1703180082286, + // "ts_event": 1703180082, + // "link": "", + // "sender_email": "user@example.com" + // } // { - // "id": 948562, - // "email": "test@example.com", - // "message-id": "<202312211555.14720890391@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:34:53", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "opened", - // "subject": "Reminder: Invoice 0002 from Untitled Company", - // "sending_ip": "74.125.208.8", - // "ts": 1703180093, - // "ts_epoch": 1703180093075, - // "ts_event": 1703180093, - // "link": "", - // "sender_email": "user@example.com" - // } + // "id": 948562, + // "email": "test@example.com", + // "message-id": "<202312211555.14720890391@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:34:53", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "opened", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "74.125.208.8", + // "ts": 1703180093, + // "ts_epoch": 1703180093075, + // "ts_event": 1703180093, + // "link": "", + // "sender_email": "user@example.com" + // } + // { + // "id": 948562, + // "email": "paul@wer-ner.de", + // "message-id": "<202312280812.10968711117@smtp-relay.mailin.fr>", + // "date": "2023-12-28 09:20:18", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "click", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "79.235.133.157", + // "ts": 1703751618, + // "ts_epoch": 1703751618831, + // "ts_event": 1703751618, + // "link": "http://localhost/client/invoice/CssCvqOcKsenMCgYJ7EUNRZwxSDGUkau", + // "sender_email": "user@example.com" + // } private function processOpen() { @@ -176,23 +195,23 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "id": 948562, - // "email": "test@example", - // "message-id": "<202312211742.12697514322@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:42:31", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "delivered", - // "subject": "Reminder: Invoice 0002 from Untitled Company", - // "sending_ip": "77.32.148.26", - // "ts_event": 1703180551, - // "ts": 1703180551, - // "reason": "sent", - // "ts_epoch": 1703180551324, - // "sender_email": "user@example.com" - // } + // "id": 948562, + // "email": "test@example", + // "message-id": "<202312211742.12697514322@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:42:31", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "delivered", + // "subject": "Reminder: Invoice 0002 from Untitled Company", + // "sending_ip": "77.32.148.26", + // "ts_event": 1703180551, + // "ts": 1703180551, + // "reason": "sent", + // "ts_epoch": 1703180551324, + // "sender_email": "user@example.com" + // } private function processDelivery() { $this->invitation->email_status = 'delivered'; @@ -218,74 +237,74 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "id": 948562, - // "email": "ryder36@example.net", - // "message-id": "<202312211744.55168080257@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:44:52", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "soft_bounce", - // "subject": "Reminder: Invoice 0001 from Untitled Company", - // "sending_ip": "77.32.148.26", - // "ts_event": 1703180692, - // "ts": 1703180692, - // "reason": "Unable to find MX of domain example.net", - // "ts_epoch": 1703180692382, - // "sender_email": "user@example.com" - // } + // "id": 948562, + // "email": "ryder36@example.net", + // "message-id": "<202312211744.55168080257@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:44:52", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "soft_bounce", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "sending_ip": "77.32.148.26", + // "ts_event": 1703180692, + // "ts": 1703180692, + // "reason": "Unable to find MX of domain example.net", + // "ts_epoch": 1703180692382, + // "sender_email": "user@example.com" + // } // { - // "id": 948562, - // "email": "gloria46@example.com", - // "message-id": "<202312211744.57456703957@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:44:54", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "hard_bounce", - // "subject": "Reminder: Invoice 0001 from Untitled Company", - // "sending_ip": "77.32.148.25", - // "ts_event": 1703180694, - // "ts": 1703180694, - // "reason": "blocked by Admin", - // "ts_epoch": 1703180694175, - // "sender_email": "user@example.com" - // } - // { - // "event" : "invalid_email", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-mm-dd hh:i:s", - // "message-id" : "", - // "subject" : "Test subject", - // "tag" : "",//json of array - // "tags": [ - // "company_key" - // ], - // "sending_ip" : "xxx.xx.xxx.xx", - // "ts_epoch" : 1534486682000, - // "template_id" : 1, - // "sender_email": "user@example.com", - // } + // "id": 948562, + // "email": "gloria46@example.com", + // "message-id": "<202312211744.57456703957@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:44:54", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "hard_bounce", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "sending_ip": "77.32.148.25", + // "ts_event": 1703180694, + // "ts": 1703180694, + // "reason": "blocked by Admin", + // "ts_epoch": 1703180694175, + // "sender_email": "user@example.com" + // } // { - // "id": 948562, - // "email": "neoma.langosh@example.com", - // "message-id": "<202312211745.65538701430@smtp-relay.mailin.fr>", - // "date": "2023-12-21 18:45:48", - // "tags": [ - // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" - // ], - // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", - // "event": "blocked", - // "subject": "Reminder: Invoice 0001 from Untitled Company", - // "ts_event": 1703180748, - // "ts": 1703180748, - // "reason": "blocked : due to blacklist user", - // "ts_epoch": 1703180748987, - // "sender_email": "user@example.com" - // } + // "event" : "invalid_email", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "subject" : "Test subject", + // "tag" : "",//json of array + // "tags": [ + // "company_key" + // ], + // "sending_ip" : "xxx.xx.xxx.xx", + // "ts_epoch" : 1534486682000, + // "template_id" : 1, + // "sender_email": "user@example.com", + // } + // { + // "id": 948562, + // "email": "neoma.langosh@example.com", + // "message-id": "<202312211745.65538701430@smtp-relay.mailin.fr>", + // "date": "2023-12-21 18:45:48", + // "tags": [ + // "gMtwiTIJtJxklXCj1OUFANgY6YYynQxV" + // ], + // "tag": "[\"gMtwiTIJtJxklXCj1OUFANgY6YYynQxV\"]", + // "event": "blocked", + // "subject": "Reminder: Invoice 0001 from Untitled Company", + // "ts_event": 1703180748, + // "ts": 1703180748, + // "reason": "blocked : due to blacklist user", + // "ts_epoch": 1703180748987, + // "sender_email": "user@example.com" + // } private function processBounce() { @@ -316,17 +335,17 @@ class ProcessBrevoWebhook implements ShouldQueue } // { - // "event" : "spam", - // "email" : "example@example.com", - // "id" : 1, - // "date" : "yyyy-mm-dd hh:i:s", - // "message-id" : "", - // "tag" : "",//json of array - // "tags": [ - // "company_key" - // ], - // "sending_ip" : "xxx.xx.xxx.xx", - // "sender_email": "user@example.com", + // "event" : "spam", + // "email" : "example@example.com", + // "id" : 1, + // "date" : "yyyy-mm-dd hh:i:s", + // "message-id" : "", + // "tag" : "",//json of array + // "tags": [ + // "company_key" + // ], + // "sending_ip" : "xxx.xx.xxx.xx", + // "sender_email": "user@example.com", // } private function processSpamComplaint() { @@ -357,7 +376,7 @@ class ProcessBrevoWebhook implements ShouldQueue } } - private function discoverInvitation($message_id) + private function discoverInvitation(string $message_id) { $invitation = false; From 8660982c02c213f3f5efe70b009a1c02b363b07b Mon Sep 17 00:00:00 2001 From: paulwer Date: Thu, 28 Dec 2023 09:29:37 +0100 Subject: [PATCH 09/92] revert local changes for testing --- app/Http/Controllers/BrevoController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/BrevoController.php b/app/Http/Controllers/BrevoController.php index 10950bdc6cbb..e1dce175f485 100644 --- a/app/Http/Controllers/BrevoController.php +++ b/app/Http/Controllers/BrevoController.php @@ -61,12 +61,12 @@ class BrevoController extends BaseController */ public function webhook(Request $request) { - // if ($request->has('token') && $request->get('token') == config('services.brevo.key')) { - ProcessBrevoWebhook::dispatch($request->all())->delay(10); + if ($request->has('token') && $request->get('token') == config('services.brevo.key')) { + ProcessBrevoWebhook::dispatch($request->all())->delay(10); - return response()->json(['message' => 'Success'], 200); - // } + return response()->json(['message' => 'Success'], 200); + } - // return response()->json(['message' => 'Unauthorized'], 403); + return response()->json(['message' => 'Unauthorized'], 403); } } From a8633d5d70b6387751ec4d5a4cad974be02871b6 Mon Sep 17 00:00:00 2001 From: paulwer Date: Wed, 3 Jan 2024 22:44:12 +0100 Subject: [PATCH 10/92] minor changes --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 38 ++++++++++++++------------ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 70d96d57420b..d9fb7ac0d0de 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -184,14 +184,16 @@ class ProcessBrevoWebhook implements ShouldQueue return; } - (new SystemLogger( - $data, - SystemLog::CATEGORY_MAIL, - SystemLog::EVENT_MAIL_OPENED, - SystemLog::TYPE_WEBHOOK_RESPONSE, - $this->invitation->contact->client, - $this->invitation->company - ))->handle(); + ( + new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_OPENED, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ) + )->handle(); } // { @@ -226,14 +228,16 @@ class ProcessBrevoWebhook implements ShouldQueue return; } - (new SystemLogger( - $data, - SystemLog::CATEGORY_MAIL, - SystemLog::EVENT_MAIL_DELIVERY, - SystemLog::TYPE_WEBHOOK_RESPONSE, - $this->invitation->contact->client, - $this->invitation->company - ))->handle(); + ( + new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_DELIVERY, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ) + )->handle(); } // { @@ -449,7 +453,7 @@ class ProcessBrevoWebhook implements ShouldQueue 'delivery_message' => $event->Details->DeliveryMessage ?? $event->Details->Summary ?? '', 'server' => $event->Details->DestinationServer ?? '', 'server_ip' => $event->Details->DestinationIP ?? '', - 'date' => \Carbon\Carbon::parse($event->ReceivedAt)->format('Y-m-d H:i:s') ?? '', + 'date' => \Carbon\Carbon::parse($event->getTime())->format('Y-m-d H:i:s') ?? '', ]; })->toArray(); From 1b54bcc8a68e52561c4c14c943323f6dbb3635bf Mon Sep 17 00:00:00 2001 From: paulwer Date: Mon, 15 Jan 2024 11:42:08 +0100 Subject: [PATCH 11/92] events --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index d9fb7ac0d0de..367cd824926b 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -441,25 +441,28 @@ class ProcessBrevoWebhook implements ShouldQueue $messageDetail = $this->getRawMessage($this->request['message-id']); - $recipients = $this->request["email"]; + $recipient = array_key_exists("email", $this->request) ? $this->request["email"] : ''; + $server_ip = array_key_exists("sending_ip", $this->request) ? $this->request["sending_ip"] : ''; + $delivery_message = array_key_exists("reason", $this->request) ? $this->request["reason"] : ''; $subject = $messageDetail->getSubject() ?? ''; - $events = collect($messageDetail->getEvents())->map(function (GetTransacEmailContentEvents $event) { // @turbo124 event does only contain name & time property, how to handle transformation?! + $events = collect($messageDetail->getEvents())->map(function (GetTransacEmailContentEvents $event) use ($recipient, $server_ip, $delivery_message) { // @turbo124 event does only contain name & time property, how to handle transformation?! return [ - 'bounce_id' => $event?->Details?->BounceID ?? '', - 'recipient' => $event->Recipient ?? '', - 'status' => $event->Type ?? '', - 'delivery_message' => $event->Details->DeliveryMessage ?? $event->Details->Summary ?? '', - 'server' => $event->Details->DestinationServer ?? '', - 'server_ip' => $event->Details->DestinationIP ?? '', + 'bounce_id' => '', + 'recipient' => $recipient, + 'status' => $event->name ?? '', + 'delivery_message' => $delivery_message, // TODO: @turbo124 this results in all cases for the history in the string, which may be incorrect + + 'server' => '', + 'server_ip' => $server_ip, 'date' => \Carbon\Carbon::parse($event->getTime())->format('Y-m-d H:i:s') ?? '', ]; })->toArray(); return [ - 'recipients' => $recipients, + 'recipients' => $recipient, 'subject' => $subject, 'entity' => $this->entity ?? '', 'entity_id' => $this->invitation->{$this->entity}->hashed_id ?? '', From 1a88a81324eb7814617932e0c4fa928d9877ee6b Mon Sep 17 00:00:00 2001 From: paulwer Date: Mon, 15 Jan 2024 11:42:20 +0100 Subject: [PATCH 12/92] cleanups --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 367cd824926b..e59cd9e18b54 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -453,7 +453,6 @@ class ProcessBrevoWebhook implements ShouldQueue 'recipient' => $recipient, 'status' => $event->name ?? '', 'delivery_message' => $delivery_message, // TODO: @turbo124 this results in all cases for the history in the string, which may be incorrect - 'server' => '', 'server_ip' => $server_ip, 'date' => \Carbon\Carbon::parse($event->getTime())->format('Y-m-d H:i:s') ?? '', From 1654d72bc23931df44b83d0191640f75bf78c14e Mon Sep 17 00:00:00 2001 From: paulwer Date: Tue, 16 Jan 2024 07:01:54 +0100 Subject: [PATCH 13/92] some additional missing changes form handler method --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index e59cd9e18b54..fa0e85d1871a 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -15,12 +15,14 @@ use App\DataMapper\Analytics\Mail\EmailBounce; use App\DataMapper\Analytics\Mail\EmailSpam; use App\Jobs\Util\SystemLogger; use App\Libraries\MultiDB; +use App\Models\Company; use App\Models\CreditInvitation; use App\Models\InvoiceInvitation; use App\Models\PurchaseOrderInvitation; use App\Models\QuoteInvitation; use App\Models\RecurringInvoiceInvitation; use App\Models\SystemLog; +use App\Notifications\Ninja\EmailBounceNotification; use App\Notifications\Ninja\EmailSpamNotification; use Brevo\Client\Configuration; use Brevo\Client\Model\GetTransacEmailContentEvents; @@ -84,16 +86,21 @@ class ProcessBrevoWebhook implements ShouldQueue public function handle() { MultiDB::findAndSetDbByCompanyKey($this->request['tags'][0]); + $company = Company::where('company_key', $this->request['tags'][0])->first(); $this->invitation = $this->discoverInvitation($this->request['message-id']); + if ($company && $this->request['event'] == 'spam' && config('ninja.notification.slack')) { + $company->notification(new EmailSpamNotification($company))->ninja(); + } + if (!$this->invitation) { return; } - // if (array_key_exists('Details', $this->request)) { - // $this->invitation->email_error = $this->request['Details']; - // } // no details, when error occured + if (array_key_exists('reason', $this->request)) { + $this->invitation->email_error = $this->request['reason']; + } switch ($this->request['event']) { case 'delivered': @@ -102,6 +109,11 @@ class ProcessBrevoWebhook implements ShouldQueue case 'hard_bounce': case 'invalid_email': case 'blocked': + + if ($this->request['subject'] == ctrans('texts.confirmation_subject')) { + $company->notification(new EmailBounceNotification($this->request['email']))->ninja(); + } + return $this->processBounce(); case 'spam': return $this->processSpamComplaint(); From fb7b82399333915b0ac6f8d601ac03884a1e0767 Mon Sep 17 00:00:00 2001 From: paulwer Date: Tue, 16 Jan 2024 07:05:49 +0100 Subject: [PATCH 14/92] removal of unnecessary config file --- config/brevo.php | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 config/brevo.php diff --git a/config/brevo.php b/config/brevo.php deleted file mode 100644 index 7fae1ccab09b..000000000000 --- a/config/brevo.php +++ /dev/null @@ -1,30 +0,0 @@ - env('BREVO_SECRET'), - - /* - |-------------------------------------------------------------------------- - | Guzzle options - |-------------------------------------------------------------------------- - | - | Under the hood we use Guzzle to make API calls to Postmark. - | Here you may provide any request options for Guzzle. - | - */ - - 'guzzle' => [ - 'timeout' => 120, - 'connect_timeout' => 120, - ], -]; From 175e9eafb7d5e2414776bac6650bb4a2deb4359c Mon Sep 17 00:00:00 2001 From: paulwer Date: Sat, 20 Jan 2024 08:34:13 +0100 Subject: [PATCH 15/92] updates deps --- composer.lock | 2763 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 2087 insertions(+), 676 deletions(-) diff --git a/composer.lock b/composer.lock index d17209bdaa7f..8094be6a9e46 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "359f228fda9c04b6ed93f1e337152473", + "content-hash": "ea99855f59e2b66bb9c42b39ba24a953", "packages": [ { "name": "afosto/yaac", @@ -33,7 +33,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "Afosto Team", @@ -42,7 +44,14 @@ ], "description": "Yet Another ACME client: a decoupled LetsEncrypt client", "homepage": "https://afosto.com", - "keywords": ["ACME", "acmev2", "afosto", "encrypt", "lets", "v2"], + "keywords": [ + "ACME", + "acmev2", + "afosto", + "encrypt", + "lets", + "v2" + ], "support": { "issues": "https://github.com/afosto/yaac/issues", "source": "https://github.com/afosto/yaac/tree/v1.5.2" @@ -84,7 +93,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -168,7 +179,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -399,7 +412,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -464,7 +479,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -477,7 +494,12 @@ ], "description": "A generator parser to make streaming parsers simple.", "homepage": "https://github.com/amphp/parser", - "keywords": ["async", "non-blocking", "parser", "stream"], + "keywords": [ + "async", + "non-blocking", + "parser", + "stream" + ], "support": { "issues": "https://github.com/amphp/parser/issues", "source": "https://github.com/amphp/parser/tree/v1.1.0" @@ -594,7 +616,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Bob Weinand", @@ -646,13 +670,17 @@ }, "type": "library", "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "Amp\\Serialization\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -665,7 +693,12 @@ ], "description": "Serialization tools for IPC and data storage in PHP.", "homepage": "https://github.com/amphp/serialization", - "keywords": ["async", "asynchronous", "serialization", "serialize"], + "keywords": [ + "async", + "asynchronous", + "serialization", + "serialize" + ], "support": { "issues": "https://github.com/amphp/serialization/issues", "source": "https://github.com/amphp/serialization/tree/master" @@ -793,7 +826,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Aaron Piotrowski", @@ -883,16 +918,16 @@ }, { "name": "apimatic/core", - "version": "0.3.4", + "version": "0.3.5", "source": { "type": "git", "url": "https://github.com/apimatic/core-lib-php.git", - "reference": "4610b3724f453212d30c56955e3d617def41702e" + "reference": "0ccfb70c2b01bde35c30b451546ab6510193a992" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/4610b3724f453212d30c56955e3d617def41702e", - "reference": "4610b3724f453212d30c56955e3d617def41702e", + "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/0ccfb70c2b01bde35c30b451546ab6510193a992", + "reference": "0ccfb70c2b01bde35c30b451546ab6510193a992", "shasum": "" }, "require": { @@ -917,15 +952,22 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Core logic and the utilities for the Apimatic's PHP SDK", "homepage": "https://github.com/apimatic/core-lib-php", - "keywords": ["apimatic", "core", "corelib", "php"], + "keywords": [ + "apimatic", + "core", + "corelib", + "php" + ], "support": { "issues": "https://github.com/apimatic/core-lib-php/issues", - "source": "https://github.com/apimatic/core-lib-php/tree/0.3.4" + "source": "https://github.com/apimatic/core-lib-php/tree/0.3.5" }, - "time": "2023-12-23T04:02:17+00:00" + "time": "2024-01-17T13:46:44+00:00" }, { "name": "apimatic/core-interfaces", @@ -951,7 +993,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Definition of the behavior of apimatic/core, apimatic/unirest-php and Apimatic's PHP SDK", "homepage": "https://github.com/apimatic/core-interfaces-php", "keywords": [ @@ -997,7 +1041,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["OSL-3.0"], + "license": [ + "OSL-3.0" + ], "authors": [ { "name": "Christian Weiske", @@ -1052,7 +1098,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mashape", @@ -1069,7 +1117,13 @@ ], "description": "Unirest PHP", "homepage": "https://github.com/apimatic/unirest-php", - "keywords": ["client", "curl", "http", "https", "rest"], + "keywords": [ + "client", + "curl", + "http", + "https", + "rest" + ], "support": { "email": "opensource@apimatic.io", "issues": "https://github.com/apimatic/unirest-php/issues", @@ -1107,7 +1161,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Marc Aschmann", @@ -1116,7 +1172,10 @@ ], "description": "A PHP wrapper for Ansible.", "homepage": "https://github.com/maschmann/php-ansible", - "keywords": ["ansible", "php"], + "keywords": [ + "ansible", + "php" + ], "support": { "issues": "https://github.com/maschmann/php-ansible/issues", "source": "https://github.com/maschmann/php-ansible/tree/v4.1.0" @@ -1144,10 +1203,14 @@ }, "type": "library", "autoload": { - "classmap": ["lib"] + "classmap": [ + "lib" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["proprietary"], + "license": [ + "proprietary" + ], "description": "Official PHP SDK for Authorize.Net", "homepage": "http://developer.authorize.net", "keywords": [ @@ -1197,7 +1260,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Claudin J. Daniel", @@ -1248,10 +1313,14 @@ }, "type": "library", "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "AWS SDK Common Runtime Team", @@ -1260,7 +1329,12 @@ ], "description": "AWS Common Runtime for PHP", "homepage": "https://github.com/awslabs/aws-crt-php", - "keywords": ["amazon", "aws", "crt", "sdk"], + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], "support": { "issues": "https://github.com/awslabs/aws-crt-php/issues", "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.4" @@ -1269,16 +1343,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.296.1", + "version": "3.296.6", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b" + "reference": "11d0a94f8b2539d587e2f6db7c2fa8e39fe78a67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b", - "reference": "38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/11d0a94f8b2539d587e2f6db7c2fa8e39fe78a67", + "reference": "11d0a94f8b2539d587e2f6db7c2fa8e39fe78a67", "shasum": "" }, "require": { @@ -1326,13 +1400,17 @@ } }, "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "Aws\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "Amazon Web Services", @@ -1354,9 +1432,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.296.1" + "source": "https://github.com/aws/aws-sdk-php/tree/3.296.6" }, - "time": "2024-01-14T05:20:33+00:00" + "time": "2024-01-19T19:14:55+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1393,7 +1471,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-2-Clause"], + "license": [ + "BSD-2-Clause" + ], "authors": [ { "name": "Ben Scholzen 'DASPRiD'", @@ -1436,7 +1516,9 @@ "friendsofphp/php-cs-fixer": "^3.6", "phpunit/phpunit": "^9.5" }, - "bin": ["snappdf"], + "bin": [ + "snappdf" + ], "type": "library", "autoload": { "psr-4": { @@ -1444,7 +1526,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Benjamin Beganović", @@ -1491,7 +1575,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Braintree", @@ -1534,7 +1620,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Arbitrary-precision arithmetic library", "keywords": [ "Arbitrary-precision", @@ -1590,7 +1678,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "KyleKatarn", @@ -1598,7 +1688,13 @@ } ], "description": "Types to use Carbon in Doctrine", - "keywords": ["carbon", "date", "datetime", "doctrine", "time"], + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" @@ -1655,7 +1751,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Checkout.com", @@ -1709,11 +1807,15 @@ "type": "library", "autoload": { "psr-4": { - "CleverIt\\UBL\\Invoice\\": ["src/"] + "CleverIt\\UBL\\Invoice\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Bram van Eijk | CleverIT", @@ -1762,13 +1864,17 @@ }, "type": "library", "autoload": { - "files": ["src/functions_include.php"], + "files": [ + "src/functions_include.php" + ], "psr-4": { "Clue\\StreamFilter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Christian Lück", @@ -1839,7 +1945,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jordi Boggiano", @@ -1848,7 +1956,13 @@ } ], "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": ["cabundle", "cacert", "certificate", "ssl", "tls"], + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", @@ -1898,7 +2012,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-2-Clause"], + "license": [ + "BSD-2-Clause" + ], "authors": [ { "name": "Ben Scholzen 'DASPRiD'", @@ -1908,7 +2024,10 @@ } ], "description": "PHP 7.1 enum implementation", - "keywords": ["enum", "map"], + "keywords": [ + "enum", + "map" + ], "support": { "issues": "https://github.com/DASPRiD/Enum/issues", "source": "https://github.com/DASPRiD/Enum/tree/1.0.5" @@ -1995,7 +2114,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Dragonfly Development Inc.", @@ -2020,7 +2141,12 @@ ], "description": "Given a deep data structure, access data by dot notation.", "homepage": "https://github.com/dflydev/dflydev-dot-access-data", - "keywords": ["access", "data", "dot", "notation"], + "keywords": [ + "access", + "data", + "dot", + "notation" + ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" @@ -2065,7 +2191,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2090,7 +2218,11 @@ ], "description": "Docblock Annotations Parser", "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": ["annotations", "docblock", "parser"], + "keywords": [ + "annotations", + "docblock", + "parser" + ], "support": { "issues": "https://github.com/doctrine/annotations/issues", "source": "https://github.com/doctrine/annotations/tree/2.0.1" @@ -2132,7 +2264,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2228,7 +2362,9 @@ "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." }, - "bin": ["bin/doctrine-dbal"], + "bin": [ + "bin/doctrine-dbal" + ], "type": "library", "autoload": { "psr-4": { @@ -2236,7 +2372,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2333,7 +2471,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", "homepage": "https://www.doctrine-project.org/", "support": { @@ -2375,7 +2515,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2463,7 +2605,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2554,7 +2698,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Marco Pivetta", @@ -2564,7 +2710,10 @@ ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": ["constructor", "instantiate"], + "keywords": [ + "constructor", + "instantiate" + ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", "source": "https://github.com/doctrine/instantiator/tree/2.0.0" @@ -2616,7 +2765,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Guilherme Blanco", @@ -2633,7 +2784,13 @@ ], "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": ["annotations", "docblock", "lexer", "parser", "php"], + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], "support": { "issues": "https://github.com/doctrine/lexer/issues", "source": "https://github.com/doctrine/lexer/tree/3.0.0" @@ -2688,7 +2845,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Chris Tankersley", @@ -2697,7 +2856,10 @@ } ], "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": ["cron", "schedule"], + "keywords": [ + "cron", + "schedule" + ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" @@ -2748,7 +2910,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Eduardo Gulias Davis" @@ -2820,7 +2984,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jeroen van den Enden", @@ -2829,7 +2995,13 @@ ], "description": "Endroid QR Code", "homepage": "https://github.com/endroid/qr-code", - "keywords": ["code", "endroid", "php", "qr", "qrcode"], + "keywords": [ + "code", + "endroid", + "php", + "qr", + "qrcode" + ], "support": { "issues": "https://github.com/endroid/qr-code/issues", "source": "https://github.com/endroid/qr-code/tree/5.0.4" @@ -2875,7 +3047,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "eWAY", @@ -2884,7 +3058,12 @@ ], "description": "eWAY Rapid PHP library", "homepage": "https://www.eway.com.au", - "keywords": ["eway", "payment processing", "payments", "rapid"], + "keywords": [ + "eway", + "payment processing", + "payments", + "rapid" + ], "support": { "issues": "https://github.com/eWAYPayment/eway-rapid-php/issues", "source": "https://github.com/eWAYPayment/eway-rapid-php/tree/v1.4.1" @@ -2920,14 +3099,20 @@ }, "type": "library", "autoload": { - "files": ["library/HTMLPurifier.composer.php"], + "files": [ + "library/HTMLPurifier.composer.php" + ], "psr-0": { "HTMLPurifier": "library/" }, - "exclude-from-classmap": ["/library/HTMLPurifier/Language/"] + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["LGPL-2.1-or-later"], + "license": [ + "LGPL-2.1-or-later" + ], "authors": [ { "name": "Edward Z. Yang", @@ -2937,7 +3122,9 @@ ], "description": "Standards compliant HTML filter written in PHP", "homepage": "http://htmlpurifier.org/", - "keywords": ["html"], + "keywords": [ + "html" + ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" @@ -2987,14 +3174,20 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "François Zaninotto" } ], "description": "Faker is a PHP library that generates fake data for you.", - "keywords": ["data", "faker", "fixtures"], + "keywords": [ + "data", + "faker", + "fixtures" + ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" @@ -3037,7 +3230,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Neuman Vong", @@ -3052,7 +3247,10 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "keywords": ["jwt", "php"], + "keywords": [ + "jwt", + "php" + ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" @@ -3094,7 +3292,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fruitcake", @@ -3107,7 +3307,11 @@ ], "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", "homepage": "https://github.com/fruitcake/php-cors", - "keywords": ["cors", "laravel", "symfony"], + "keywords": [ + "cors", + "laravel", + "symfony" + ], "support": { "issues": "https://github.com/fruitcake/php-cors/issues", "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0" @@ -3162,7 +3366,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Brevo Developers", @@ -3172,7 +3378,13 @@ ], "description": "Official Brevo provided RESTFul API V3 php library", "homepage": "https://github.com/getbrevo/brevo-php", - "keywords": ["api", "brevo", "php", "sdk", "swagger"], + "keywords": [ + "api", + "brevo", + "php", + "sdk", + "swagger" + ], "support": { "issues": "https://github.com/getbrevo/brevo-php/issues", "source": "https://github.com/getbrevo/brevo-php/tree/v1.0.2" @@ -3212,7 +3424,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "GoCardless and contributors", @@ -3221,7 +3435,11 @@ ], "description": "GoCardless Pro PHP Client Library", "homepage": "https://gocardless.com/", - "keywords": ["api", "direct debit", "gocardless"], + "keywords": [ + "api", + "direct debit", + "gocardless" + ], "support": { "issues": "https://github.com/gocardless/gocardless-pro-php/issues", "source": "https://github.com/gocardless/gocardless-pro-php/tree/v4.28.0" @@ -3265,14 +3483,23 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Asmir Mustafic" } ], "description": "Convert XSD (XML Schema) definitions into PHP classes", - "keywords": ["converter", "jms", "php", "serializer", "xml", "xsd"], + "keywords": [ + "converter", + "jms", + "php", + "serializer", + "xml", + "xsd" + ], "support": { "issues": "https://github.com/goetas-webservices/xsd2php-runtime/issues", "source": "https://github.com/goetas-webservices/xsd2php-runtime/tree/v0.2.16" @@ -3323,17 +3550,25 @@ } }, "autoload": { - "files": ["src/aliases.php"], + "files": [ + "src/aliases.php" + ], "psr-4": { "Google\\": "src/" }, - "classmap": ["src/aliases.php"] + "classmap": [ + "src/aliases.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "description": "Client library for Google APIs", "homepage": "http://developers.google.com/api-client-library/php", - "keywords": ["google"], + "keywords": [ + "google" + ], "support": { "issues": "https://github.com/googleapis/google-api-php-client/issues", "source": "https://github.com/googleapis/google-api-php-client/tree/v2.15.3" @@ -3362,16 +3597,22 @@ }, "type": "library", "autoload": { - "files": ["autoload.php"], + "files": [ + "autoload.php" + ], "psr-4": { "Google\\Service\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "description": "Client library for Google APIs", "homepage": "http://developers.google.com/api-client-library/php", - "keywords": ["google"], + "keywords": [ + "google" + ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.332.0" @@ -3419,10 +3660,16 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "description": "Google Auth Library for PHP", "homepage": "http://github.com/google/google-auth-library-php", - "keywords": ["Authentication", "google", "oauth2"], + "keywords": [ + "Authentication", + "google", + "oauth2" + ], "support": { "docs": "https://googleapis.github.io/google-auth-library-php/main/", "issues": "https://github.com/googleapis/google-auth-library-php/issues", @@ -3458,7 +3705,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -3523,7 +3772,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Benjamin Zikarsky", @@ -3587,13 +3838,17 @@ } }, "autoload": { - "files": ["src/functions_include.php"], + "files": [ + "src/functions_include.php" + ], "psr-4": { "GuzzleHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -3697,7 +3952,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -3721,7 +3978,9 @@ } ], "description": "Guzzle promises library", - "keywords": ["promise"], + "keywords": [ + "promise" + ], "support": { "issues": "https://github.com/guzzle/promises/issues", "source": "https://github.com/guzzle/promises/tree/2.0.2" @@ -3787,7 +4046,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -3892,7 +4153,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -3916,7 +4179,10 @@ } ], "description": "A polyfill class for uri_template of PHP", - "keywords": ["guzzlehttp", "uri-template"], + "keywords": [ + "guzzlehttp", + "uri-template" + ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" @@ -3965,13 +4231,17 @@ }, "type": "library", "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "JsonMachine\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "Filip Halaxa", @@ -4023,7 +4293,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ivan Akimov", @@ -4082,7 +4354,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "hedii", @@ -4141,7 +4415,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Daniel Erling", @@ -4151,7 +4427,10 @@ ], "description": "Get mimetypes by fileextensions and visa versa", "homepage": "https://github.com/horstoeko/mimedb", - "keywords": ["file extension", "mimetype"], + "keywords": [ + "file extension", + "mimetype" + ], "support": { "issues": "https://github.com/horstoeko/mimedb/issues", "source": "https://github.com/horstoeko/mimedb/tree/v1.0.5" @@ -4191,7 +4470,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Daniel Erling", @@ -4201,7 +4482,9 @@ ], "description": "A library for string manipulation utilities", "homepage": "https://github.com/horstoeko/stringmanagement", - "keywords": ["stringmanagement"], + "keywords": [ + "stringmanagement" + ], "support": { "issues": "https://github.com/horstoeko/stringmanagement/issues", "source": "https://github.com/horstoeko/stringmanagement/tree/v1.0.11" @@ -4256,7 +4539,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Daniel Erling", @@ -4315,7 +4600,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -4323,7 +4610,12 @@ } ], "description": "An HTTP Factory using Guzzle PSR7", - "keywords": ["factory", "http", "psr-17", "psr-7"], + "keywords": [ + "factory", + "http", + "psr-17", + "psr-7" + ], "support": { "issues": "https://github.com/http-interop/http-factory-guzzle/issues", "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0" @@ -4367,7 +4659,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "imdhemy", @@ -4416,7 +4710,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "imdhemy", @@ -4477,7 +4773,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "imdhemy", @@ -4539,7 +4837,9 @@ "dev-master": "2.4-dev" }, "laravel": { - "providers": ["Intervention\\Image\\ImageServiceProvider"], + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], "aliases": { "Image": "Intervention\\Image\\Facades\\Image" } @@ -4551,7 +4851,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Oliver Vogel", @@ -4625,7 +4927,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Benjamin Beganović", @@ -4635,7 +4939,10 @@ ], "description": "Simplified database records management", "homepage": "https://github.com/invoiceninja/inspector", - "keywords": ["inspector", "invoiceninja"], + "keywords": [ + "inspector", + "invoiceninja" + ], "support": { "issues": "https://github.com/invoiceninja/inspector/issues", "source": "https://github.com/invoiceninja/inspector/tree/v2.0" @@ -4679,7 +4986,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Alessandro Lai", @@ -4687,7 +4996,12 @@ } ], "description": "A library to get pretty versions strings of installed dependencies", - "keywords": ["composer", "package", "release", "versions"], + "keywords": [ + "composer", + "package", + "release", + "versions" + ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" @@ -4732,7 +5046,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Johannes M. Schmitt", @@ -4744,7 +5060,12 @@ } ], "description": "Class/method/property metadata management in PHP", - "keywords": ["annotations", "metadata", "xml", "yaml"], + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], "support": { "issues": "https://github.com/schmittjoh/metadata/issues", "source": "https://github.com/schmittjoh/metadata/tree/2.8.0" @@ -4813,7 +5134,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Johannes M. Schmitt", @@ -4878,7 +5201,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "josemmo", @@ -4888,7 +5213,12 @@ ], "description": "Librería para la generación, firma y envío de facturas electrónicas", "homepage": "https://github.com/josemmo/Facturae-PHP", - "keywords": ["face", "faceb2b", "facturae", "xades"], + "keywords": [ + "face", + "faceb2b", + "facturae", + "xades" + ], "support": { "issues": "https://github.com/josemmo/Facturae-PHP/issues", "source": "https://github.com/josemmo/Facturae-PHP/tree/v1.7.9" @@ -4973,11 +5303,15 @@ "type": "library", "autoload": { "psr-4": { - "kmukku\\phpIso11649\\": ["src/"] + "kmukku\\phpIso11649\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Keijo Mukku", @@ -5027,7 +5361,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jeffrey Way", @@ -5035,7 +5371,11 @@ } ], "description": "Simple view presenters", - "keywords": ["laravel", "presenter", "view"], + "keywords": [ + "laravel", + "presenter", + "view" + ], "support": { "issues": "https://github.com/laracasts/Presenter/issues", "source": "https://github.com/laracasts/Presenter/tree/0.2.6" @@ -5044,16 +5384,16 @@ }, { "name": "laravel/framework", - "version": "v10.40.0", + "version": "v10.41.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "7a9470071dac9579ebf29ad1b9d73e4b8eb586fc" + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/7a9470071dac9579ebf29ad1b9d73e4b8eb586fc", - "reference": "7a9470071dac9579ebf29ad1b9d73e4b8eb586fc", + "url": "https://api.github.com/repos/laravel/framework/zipball/da31969bd35e6ee0bbcd9e876f88952dc754b012", + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012", "shasum": "" }, "require": { @@ -5226,7 +5566,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5235,12 +5577,15 @@ ], "description": "The Laravel Framework.", "homepage": "https://laravel.com", - "keywords": ["framework", "laravel"], + "keywords": [ + "framework", + "laravel" + ], "support": { "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-09T11:46:47+00:00" + "time": "2024-01-16T15:23:58+00:00" }, { "name": "laravel/prompts", @@ -5282,13 +5627,17 @@ } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Laravel\\Prompts\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "support": { "issues": "https://github.com/laravel/prompts/issues", "source": "https://github.com/laravel/prompts/tree/v0.1.15" @@ -5330,7 +5679,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5342,7 +5693,11 @@ } ], "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", - "keywords": ["closure", "laravel", "serializable"], + "keywords": [ + "closure", + "laravel", + "serializable" + ], "support": { "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" @@ -5389,7 +5744,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5397,7 +5754,11 @@ } ], "description": "Slack Notification Channel for laravel.", - "keywords": ["laravel", "notifications", "slack"], + "keywords": [ + "laravel", + "notifications", + "slack" + ], "support": { "issues": "https://github.com/laravel/slack-notification-channel/issues", "source": "https://github.com/laravel/slack-notification-channel/tree/v2.5.0" @@ -5453,7 +5814,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5462,7 +5825,10 @@ ], "description": "Laravel wrapper around OAuth 1 & OAuth 2 libraries.", "homepage": "https://laravel.com", - "keywords": ["laravel", "oauth"], + "keywords": [ + "laravel", + "oauth" + ], "support": { "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" @@ -5502,7 +5868,9 @@ "type": "library", "extra": { "laravel": { - "providers": ["Laravel\\Tinker\\TinkerServiceProvider"] + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] } }, "autoload": { @@ -5511,7 +5879,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5519,7 +5889,12 @@ } ], "description": "Powerful REPL for the Laravel framework.", - "keywords": ["REPL", "Tinker", "laravel", "psysh"], + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], "support": { "issues": "https://github.com/laravel/tinker/issues", "source": "https://github.com/laravel/tinker/tree/v2.9.0" @@ -5528,28 +5903,28 @@ }, { "name": "laravel/ui", - "version": "v4.3.0", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "d166e09cdcb2e23836f694774cba77a32edb6007" + "reference": "7335d7049b2cde345c029e9d2de839b80af62bc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/d166e09cdcb2e23836f694774cba77a32edb6007", - "reference": "d166e09cdcb2e23836f694774cba77a32edb6007", + "url": "https://api.github.com/repos/laravel/ui/zipball/7335d7049b2cde345c029e9d2de839b80af62bc0", + "reference": "7335d7049b2cde345c029e9d2de839b80af62bc0", "shasum": "" }, "require": { - "illuminate/console": "^9.21|^10.0", - "illuminate/filesystem": "^9.21|^10.0", - "illuminate/support": "^9.21|^10.0", - "illuminate/validation": "^9.21|^10.0", + "illuminate/console": "^9.21|^10.0|^11.0", + "illuminate/filesystem": "^9.21|^10.0|^11.0", + "illuminate/support": "^9.21|^10.0|^11.0", + "illuminate/validation": "^9.21|^10.0|^11.0", "php": "^8.0" }, "require-dev": { - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.3" + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.3|^10.4" }, "type": "library", "extra": { @@ -5557,7 +5932,9 @@ "dev-master": "4.x-dev" }, "laravel": { - "providers": ["Laravel\\Ui\\UiServiceProvider"] + "providers": [ + "Laravel\\Ui\\UiServiceProvider" + ] } }, "autoload": { @@ -5567,7 +5944,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Taylor Otwell", @@ -5575,42 +5954,45 @@ } ], "description": "Laravel UI utilities and presets.", - "keywords": ["laravel", "ui"], + "keywords": [ + "laravel", + "ui" + ], "support": { - "source": "https://github.com/laravel/ui/tree/v4.3.0" + "source": "https://github.com/laravel/ui/tree/v4.4.0" }, - "time": "2023-12-19T14:46:09+00:00" + "time": "2024-01-12T15:56:45+00:00" }, { "name": "lcobucci/clock", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715", + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.2.0 || ~8.3.0", "psr/clock": "^1.0" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { - "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" + "infection/infection": "^0.27", + "lcobucci/coding-standard": "^11.0.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.25", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.13", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^10.2.3" }, "type": "library", "autoload": { @@ -5619,7 +6001,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Luís Cobucci", @@ -5629,7 +6013,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/3.0.0" + "source": "https://github.com/lcobucci/clock/tree/3.2.0" }, "funding": [ { @@ -5641,7 +6025,7 @@ "type": "patreon" } ], - "time": "2022-12-19T15:00:24+00:00" + "time": "2023-11-17T17:00:27+00:00" }, { "name": "lcobucci/jwt", @@ -5686,7 +6070,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Luís Cobucci", @@ -5695,7 +6081,10 @@ } ], "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": ["JWS", "jwt"], + "keywords": [ + "JWS", + "jwt" + ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", "source": "https://github.com/lcobucci/jwt/tree/4.3.0" @@ -5768,7 +6157,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Colin O'Dell", @@ -5854,7 +6245,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Colin O'Dell", @@ -5940,13 +6333,17 @@ } }, "autoload": { - "files": ["src/functions_include.php"], + "files": [ + "src/functions_include.php" + ], "psr-4": { "League\\Csv\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ignace Nyamagana Butera", @@ -6032,7 +6429,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Frank de Jonge", @@ -6100,7 +6499,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Frank de Jonge", @@ -6160,7 +6561,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Frank de Jonge", @@ -6168,7 +6571,13 @@ } ], "description": "Local filesystem adapter for Flysystem.", - "keywords": ["Flysystem", "file", "files", "filesystem", "local"], + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], "support": { "issues": "https://github.com/thephpleague/flysystem-local/issues", "source": "https://github.com/thephpleague/flysystem-local/tree/3.23.0" @@ -6230,7 +6639,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Phil Sturgeon", @@ -6241,7 +6652,12 @@ ], "description": "Handle the output of complex data structures ready for API output.", "homepage": "http://fractal.thephpleague.com/", - "keywords": ["api", "json", "league", "rest"], + "keywords": [ + "api", + "json", + "league", + "rest" + ], "support": { "issues": "https://github.com/thephpleague/fractal/issues", "source": "https://github.com/thephpleague/fractal/tree/0.20.1" @@ -6278,7 +6694,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Frank de Jonge", @@ -6346,7 +6764,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ben Corlett", @@ -6406,7 +6826,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Adrian Macneil", @@ -6419,7 +6841,12 @@ ], "description": "Omnipay payment processing library", "homepage": "https://omnipay.thephpleague.com/", - "keywords": ["checkout", "creditcard", "omnipay", "payment"], + "keywords": [ + "checkout", + "creditcard", + "omnipay", + "payment" + ], "support": { "issues": "https://github.com/thephpleague/omnipay/issues", "source": "https://github.com/thephpleague/omnipay/tree/v3.2.1" @@ -6641,20 +7068,26 @@ "type": "library", "extra": { "laravel": { - "providers": ["Livewire\\LivewireServiceProvider"], + "providers": [ + "Livewire\\LivewireServiceProvider" + ], "aliases": { "Livewire": "Livewire\\Livewire" } } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Livewire\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Caleb Porzio", @@ -6713,7 +7146,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Paul Duncan", @@ -6733,7 +7168,10 @@ } ], "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", - "keywords": ["stream", "zip"], + "keywords": [ + "stream", + "zip" + ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0" @@ -6780,7 +7218,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mark Baker", @@ -6789,7 +7229,10 @@ ], "description": "PHP Class for working with complex numbers", "homepage": "https://github.com/MarkBaker/PHPComplex", - "keywords": ["complex", "mathematics"], + "keywords": [ + "complex", + "mathematics" + ], "support": { "issues": "https://github.com/MarkBaker/PHPComplex/issues", "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" @@ -6830,7 +7273,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mark Baker", @@ -6839,7 +7284,11 @@ ], "description": "PHP Class for working with matrices", "homepage": "https://github.com/MarkBaker/PHPMatrix", - "keywords": ["mathematics", "matrix", "vector"], + "keywords": [ + "mathematics", + "matrix", + "vector" + ], "support": { "issues": "https://github.com/MarkBaker/PHPMatrix/issues", "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" @@ -6880,7 +7329,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Microsoft Graph Client Tooling", @@ -6934,7 +7385,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-2-Clause"], + "license": [ + "BSD-2-Clause" + ], "authors": [ { "name": "Mollie B.V.", @@ -7043,7 +7496,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mathias Verraes", @@ -7061,7 +7516,11 @@ ], "description": "PHP implementation of Fowler's Money pattern", "homepage": "http://moneyphp.org", - "keywords": ["Value Object", "money", "vo"], + "keywords": [ + "Value Object", + "money", + "vo" + ], "support": { "issues": "https://github.com/moneyphp/money/issues", "source": "https://github.com/moneyphp/money/tree/v4.3.0" @@ -7136,7 +7595,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jordi Boggiano", @@ -7146,7 +7607,11 @@ ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", "homepage": "https://github.com/Seldaek/monolog", - "keywords": ["log", "logging", "psr-3"], + "keywords": [ + "log", + "logging", + "psr-3" + ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", "source": "https://github.com/Seldaek/monolog/tree/3.5.0" @@ -7185,7 +7650,9 @@ "composer/xdebug-handler": "^3.0.3", "phpunit/phpunit": "^8.5.33" }, - "bin": ["bin/jp.php"], + "bin": [ + "bin/jp.php" + ], "type": "library", "extra": { "branch-alias": { @@ -7193,13 +7660,17 @@ } }, "autoload": { - "files": ["src/JmesPath.php"], + "files": [ + "src/JmesPath.php" + ], "psr-4": { "JmesPath\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Graham Campbell", @@ -7213,7 +7684,10 @@ } ], "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": ["json", "jsonpath"], + "keywords": [ + "json", + "jsonpath" + ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" @@ -7267,7 +7741,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ne-Lexa", @@ -7330,7 +7806,9 @@ "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "bin": ["bin/carbon"], + "bin": [ + "bin/carbon" + ], "type": "library", "extra": { "branch-alias": { @@ -7338,10 +7816,14 @@ "dev-master": "2.x-dev" }, "laravel": { - "providers": ["Carbon\\Laravel\\ServiceProvider"] + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] }, "phpstan": { - "includes": ["extension.neon"] + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -7350,7 +7832,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Brian Nesbitt", @@ -7364,7 +7848,11 @@ ], "description": "An API extension for DateTime that supports 281 different languages.", "homepage": "https://carbon.nesbot.com", - "keywords": ["date", "datetime", "time"], + "keywords": [ + "date", + "datetime", + "time" + ], "support": { "docs": "https://carbon.nesbot.com/docs", "issues": "https://github.com/briannesbitt/Carbon/issues", @@ -7416,10 +7904,16 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause", "GPL-2.0-only", "GPL-3.0-only"], + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], "authors": [ { "name": "David Grudl", @@ -7432,7 +7926,10 @@ ], "description": "📐 Nette Schema: validating data structures against a given Schema.", "homepage": "https://nette.org", - "keywords": ["config", "nette"], + "keywords": [ + "config", + "nette" + ], "support": { "issues": "https://github.com/nette/schema/issues", "source": "https://github.com/nette/schema/tree/v1.2.5" @@ -7441,16 +7938,16 @@ }, { "name": "nette/utils", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015" + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "shasum": "" }, "require": { @@ -7481,10 +7978,16 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause", "GPL-2.0-only", "GPL-3.0-only"], + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], "authors": [ { "name": "David Grudl", @@ -7515,9 +8018,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.3" + "source": "https://github.com/nette/utils/tree/v4.0.4" }, - "time": "2023-10-29T21:02:13+00:00" + "time": "2024-01-17T16:50:36+00:00" }, { "name": "nikic/php-parser", @@ -7541,7 +8044,9 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, - "bin": ["bin/php-parse"], + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { @@ -7554,14 +8059,19 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Nikita Popov" } ], "description": "A PHP parser written in PHP", - "keywords": ["parser", "php"], + "keywords": [ + "parser", + "php" + ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" @@ -7599,7 +8109,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nordigen Solutions", @@ -7609,7 +8121,12 @@ ], "description": "Nordigen official API client for PHP", "homepage": "https://nordigen.com", - "keywords": ["Open Banking", "api", "nordigen", "psd2"], + "keywords": [ + "Open Banking", + "api", + "nordigen", + "psd2" + ], "support": { "issues": "https://github.com/nordigen/nordigen-php/issues", "source": "https://github.com/nordigen/nordigen-php/tree/1.1.1" @@ -7650,17 +8167,23 @@ "type": "library", "extra": { "laravel": { - "providers": ["Termwind\\Laravel\\TermwindServiceProvider"] + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] } }, "autoload": { - "files": ["src/Functions.php"], + "files": [ + "src/Functions.php" + ], "psr-4": { "Termwind\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nuno Maduro", @@ -7668,7 +8191,14 @@ } ], "description": "Its like Tailwind CSS, but for the console.", - "keywords": ["cli", "console", "css", "package", "php", "style"], + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" @@ -7731,13 +8261,17 @@ } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Nwidart\\Modules\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Widart", @@ -7747,7 +8281,13 @@ } ], "description": "Laravel Module management", - "keywords": ["laravel", "module", "modules", "nwidart", "rad"], + "keywords": [ + "laravel", + "module", + "modules", + "nwidart", + "rad" + ], "support": { "issues": "https://github.com/nWidart/laravel-modules/issues", "source": "https://github.com/nWidart/laravel-modules/tree/10.0.4" @@ -7807,7 +8347,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Tobias Nyholm", @@ -7820,7 +8362,10 @@ ], "description": "A fast PHP7 implementation of PSR-7", "homepage": "https://tnyholm.se", - "keywords": ["psr-17", "psr-7"], + "keywords": [ + "psr-17", + "psr-7" + ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", "source": "https://github.com/Nyholm/psr7/tree/1.8.1" @@ -7879,10 +8424,14 @@ "psr-4": { "Omnipay\\Common\\": "src/Common" }, - "classmap": ["src/Omnipay.php"] + "classmap": [ + "src/Omnipay.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Adrian Macneil", @@ -7960,7 +8509,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Adrian Macneil", @@ -8016,7 +8567,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Paragon Initiative Enterprises", @@ -8079,7 +8632,9 @@ }, "type": "library", "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Paragon Initiative Enterprises", @@ -8088,7 +8643,12 @@ } ], "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": ["csprng", "polyfill", "pseudorandom", "random"], + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], "support": { "email": "info@paragonie.com", "issues": "https://github.com/paragonie/random_compat/issues", @@ -8123,10 +8683,14 @@ }, "type": "library", "autoload": { - "files": ["autoload.php"] + "files": [ + "autoload.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["ISC"], + "license": [ + "ISC" + ], "authors": [ { "name": "Paragon Initiative Enterprises", @@ -8207,7 +8771,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Payfast", @@ -8215,7 +8781,12 @@ } ], "description": "Payfast PHP Library", - "keywords": ["api", "onsite", "payfast", "php"], + "keywords": [ + "api", + "onsite", + "payfast", + "php" + ], "support": { "issues": "https://github.com/Payfast/payfast-php-sdk/issues", "source": "https://github.com/Payfast/payfast-php-sdk/tree/v1.1.5" @@ -8269,7 +8840,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Márk Sági-Kazár", @@ -8278,7 +8851,12 @@ ], "description": "Common HTTP Client implementations and tools for HTTPlug", "homepage": "http://httplug.io", - "keywords": ["client", "common", "http", "httplug"], + "keywords": [ + "client", + "common", + "http", + "httplug" + ], "support": { "issues": "https://github.com/php-http/client-common/issues", "source": "https://github.com/php-http/client-common/tree/2.7.1" @@ -8331,10 +8909,14 @@ "psr-4": { "Http\\Discovery\\": "src/" }, - "exclude-from-classmap": ["src/Composer/Plugin.php"] + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Márk Sági-Kazár", @@ -8400,7 +8982,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Tobias Nyholm", @@ -8409,7 +8993,10 @@ ], "description": "Guzzle 7 HTTP Adapter", "homepage": "http://httplug.io", - "keywords": ["Guzzle", "http"], + "keywords": [ + "Guzzle", + "http" + ], "support": { "issues": "https://github.com/php-http/guzzle7-adapter/issues", "source": "https://github.com/php-http/guzzle7-adapter/tree/1.0.0" @@ -8447,7 +9034,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Eric GELOEN", @@ -8461,7 +9050,10 @@ ], "description": "HTTPlug, the HTTP client abstraction for PHP", "homepage": "http://httplug.io", - "keywords": ["client", "http"], + "keywords": [ + "client", + "http" + ], "support": { "issues": "https://github.com/php-http/httplug/issues", "source": "https://github.com/php-http/httplug/tree/2.4.0" @@ -8507,13 +9099,17 @@ }, "type": "library", "autoload": { - "files": ["src/filters.php"], + "files": [ + "src/filters.php" + ], "psr-4": { "Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Márk Sági-Kazár", @@ -8522,7 +9118,11 @@ ], "description": "HTTP Message related tools", "homepage": "http://php-http.org", - "keywords": ["http", "message", "psr-7"], + "keywords": [ + "http", + "message", + "psr-7" + ], "support": { "issues": "https://github.com/php-http/message/issues", "source": "https://github.com/php-http/message/tree/1.16.0" @@ -8559,7 +9159,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Márk Sági-Kazár", @@ -8568,7 +9170,13 @@ ], "description": "Factory interfaces for PSR-7 HTTP Message", "homepage": "http://php-http.org", - "keywords": ["factory", "http", "message", "stream", "uri"], + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], "support": { "issues": "https://github.com/php-http/message-factory/issues", "source": "https://github.com/php-http/message-factory/tree/1.1.0" @@ -8604,7 +9212,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Joel Wurtz", @@ -8617,7 +9227,9 @@ ], "description": "Promise used for asynchronous HTTP requests", "homepage": "http://httplug.io", - "keywords": ["promise"], + "keywords": [ + "promise" + ], "support": { "issues": "https://github.com/php-http/promise/issues", "source": "https://github.com/php-http/promise/tree/1.3.0" @@ -8657,7 +9269,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Raphael Stolt", @@ -8667,7 +9281,11 @@ ], "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", "homepage": "https://github.com/raphaelstolt/php-jsonpointer", - "keywords": ["json", "json pointer", "json traversal"], + "keywords": [ + "json", + "json pointer", + "json traversal" + ], "support": { "issues": "https://github.com/raphaelstolt/php-jsonpointer/issues", "source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master" @@ -8703,7 +9321,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jaap van Otterdijk", @@ -8767,7 +9387,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mike van Riel", @@ -8845,7 +9467,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Maarten Balliauw", @@ -8921,7 +9545,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "Johannes M. Schmitt", @@ -8935,7 +9561,12 @@ } ], "description": "Option Type for PHP", - "keywords": ["language", "option", "php", "type"], + "keywords": [ + "language", + "option", + "php", + "type" + ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" @@ -8983,13 +9614,17 @@ }, "type": "library", "autoload": { - "files": ["phpseclib/bootstrap.php"], + "files": [ + "phpseclib/bootstrap.php" + ], "psr-4": { "phpseclib3\\": "phpseclib/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jim Wigginton", @@ -9089,11 +9724,15 @@ "type": "library", "autoload": { "psr-4": { - "PHPStan\\PhpDocParser\\": ["src/"] + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", @@ -9130,7 +9769,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Antonio Carlos Ribeiro", @@ -9183,7 +9824,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Till Krüss", @@ -9193,7 +9836,11 @@ ], "description": "A flexible and feature-complete Redis client for PHP.", "homepage": "http://github.com/predis/predis", - "keywords": ["nosql", "predis", "redis"], + "keywords": [ + "nosql", + "predis", + "redis" + ], "support": { "issues": "https://github.com/predis/predis/issues", "source": "https://github.com/predis/predis/tree/v2.2.2" @@ -9235,7 +9882,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9243,7 +9892,11 @@ } ], "description": "Common interface for caching libraries", - "keywords": ["cache", "psr", "psr-6"], + "keywords": [ + "cache", + "psr", + "psr-6" + ], "support": { "source": "https://github.com/php-fig/cache/tree/3.0.0" }, @@ -9273,7 +9926,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9282,7 +9937,13 @@ ], "description": "Common interface for reading the clock.", "homepage": "https://github.com/php-fig/clock", - "keywords": ["clock", "now", "psr", "psr-20", "time"], + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], "support": { "issues": "https://github.com/php-fig/clock/issues", "source": "https://github.com/php-fig/clock/tree/1.0.0" @@ -9318,7 +9979,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9369,7 +10032,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9377,7 +10042,11 @@ } ], "description": "Standard interfaces for event handling.", - "keywords": ["events", "psr", "psr-14"], + "keywords": [ + "events", + "psr", + "psr-14" + ], "support": { "issues": "https://github.com/php-fig/event-dispatcher/issues", "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" @@ -9414,7 +10083,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9423,7 +10094,12 @@ ], "description": "Common interface for HTTP clients", "homepage": "https://github.com/php-fig/http-client", - "keywords": ["http", "http-client", "psr", "psr-18"], + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], "support": { "source": "https://github.com/php-fig/http-client" }, @@ -9459,7 +10135,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9511,7 +10189,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9562,7 +10242,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9571,7 +10253,11 @@ ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", - "keywords": ["log", "psr", "psr-3"], + "keywords": [ + "log", + "psr", + "psr-3" + ], "support": { "source": "https://github.com/php-fig/log/tree/3.0.0" }, @@ -9606,7 +10292,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "PHP-FIG", @@ -9614,7 +10302,13 @@ } ], "description": "Common interfaces for simple caching", - "keywords": ["cache", "caching", "psr", "psr-16", "simple-cache"], + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], "support": { "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, @@ -9653,7 +10347,9 @@ "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, - "bin": ["bin/psysh"], + "bin": [ + "bin/psysh" + ], "type": "library", "extra": { "branch-alias": { @@ -9665,13 +10361,17 @@ } }, "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "Psy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Justin Hileman", @@ -9681,7 +10381,12 @@ ], "description": "An interactive shell for modern PHP.", "homepage": "http://psysh.org", - "keywords": ["REPL", "console", "interactive", "shell"], + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", "source": "https://github.com/bobthecow/psysh/tree/v0.12.0" @@ -9726,7 +10431,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Library for interacting with the Pusher REST API", "keywords": [ "events", @@ -9770,10 +10477,14 @@ }, "type": "library", "autoload": { - "files": ["src/getallheaders.php"] + "files": [ + "src/getallheaders.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ralph Khattar", @@ -9841,7 +10552,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ben Ramsey", @@ -9850,7 +10563,14 @@ } ], "description": "A PHP library for representing and manipulating collections.", - "keywords": ["array", "collection", "hash", "map", "queue", "set"], + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], "support": { "issues": "https://github.com/ramsey/collection/issues", "source": "https://github.com/ramsey/collection/tree/2.0.0" @@ -9926,15 +10646,23 @@ } }, "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "Ramsey\\Uuid\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "keywords": ["guid", "identifier", "uuid"], + "keywords": [ + "guid", + "identifier", + "uuid" + ], "support": { "issues": "https://github.com/ramsey/uuid/issues", "source": "https://github.com/ramsey/uuid/tree/4.7.5" @@ -9976,14 +10704,18 @@ }, "type": "library", "autoload": { - "files": ["Deprecated.php"], + "files": [ + "Deprecated.php" + ], "psr-4": { "Razorpay\\Api\\": "src/", "Razorpay\\Tests\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Abhay Rana", @@ -9999,7 +10731,12 @@ ], "description": "Razorpay PHP Client Library", "homepage": "https://docs.razorpay.com", - "keywords": ["api", "client", "php", "razorpay"], + "keywords": [ + "api", + "client", + "php", + "razorpay" + ], "support": { "email": "contact@razorpay.com", "issues": "https://github.com/Razorpay/razorpay-php/issues", @@ -10116,14 +10853,20 @@ }, "type": "library", "autoload": { - "files": ["library/Deprecated.php"], + "files": [ + "library/Deprecated.php" + ], "psr-4": { "WpOrg\\Requests\\": "src/" }, - "classmap": ["library/Requests.php"] + "classmap": [ + "library/Requests.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["ISC"], + "license": [ + "ISC" + ], "authors": [ { "name": "Ryan McCue", @@ -10187,13 +10930,17 @@ }, "type": "library", "autoload": { - "files": ["lib/functions.php"], + "files": [ + "lib/functions.php" + ], "psr-4": { "Sabre\\Uri\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Evert Pot", @@ -10204,7 +10951,11 @@ ], "description": "Functions for making sense out of URIs.", "homepage": "http://sabre.io/uri/", - "keywords": ["rfc3986", "uri", "url"], + "keywords": [ + "rfc3986", + "uri", + "url" + ], "support": { "forum": "https://groups.google.com/group/sabredav-discuss", "issues": "https://github.com/sabre-io/uri/issues", @@ -10249,7 +11000,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Evert Pot", @@ -10265,7 +11018,12 @@ ], "description": "sabre/xml is an XML library that you may not hate.", "homepage": "https://sabre.io/xml/", - "keywords": ["XMLReader", "XMLWriter", "dom", "xml"], + "keywords": [ + "XMLReader", + "XMLWriter", + "dom", + "xml" + ], "support": { "forum": "https://groups.google.com/group/sabredav-discuss", "issues": "https://github.com/sabre-io/xml/issues", @@ -10294,7 +11052,9 @@ }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Sentry", @@ -10384,13 +11144,17 @@ }, "type": "library", "autoload": { - "files": ["src/functions.php"], + "files": [ + "src/functions.php" + ], "psr-4": { "Sentry\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Sentry", @@ -10479,7 +11243,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Sentry", @@ -10534,10 +11300,14 @@ }, "type": "library", "autoload": { - "classmap": ["fpdf.php"] + "classmap": [ + "fpdf.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Olivier Plathey", @@ -10547,7 +11317,10 @@ ], "description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.", "homepage": "http://www.fpdf.org", - "keywords": ["fpdf", "pdf"], + "keywords": [ + "fpdf", + "pdf" + ], "support": { "source": "https://github.com/Setasign/FPDF/tree/1.8.6" }, @@ -10591,7 +11364,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jan Slabon", @@ -10606,7 +11381,11 @@ ], "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", "homepage": "https://www.setasign.com/fpdi", - "keywords": ["fpdf", "fpdi", "pdf"], + "keywords": [ + "fpdf", + "fpdi", + "pdf" + ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", "source": "https://github.com/Setasign/FPDI/tree/v2.6.0" @@ -10655,7 +11434,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Shopify Inc.", @@ -10707,7 +11488,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["LGPL-3.0"], + "license": [ + "LGPL-3.0" + ], "authors": [ { "name": "Sebastien MALOT", @@ -10716,7 +11499,13 @@ ], "description": "Pdf parser library. Can read and extract information from pdf file.", "homepage": "https://www.pdfparser.org", - "keywords": ["extract", "parse", "parser", "pdf", "text"], + "keywords": [ + "extract", + "parse", + "parser", + "pdf", + "text" + ], "support": { "issues": "https://github.com/smalot/pdfparser/issues", "source": "https://github.com/smalot/pdfparser/tree/v2.8.0" @@ -10756,7 +11545,9 @@ "SocialiteProviders\\Apple\\": "" } }, - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ahilan", @@ -10830,7 +11621,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Andy Wendt", @@ -10891,7 +11684,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Brian Faust", @@ -10969,7 +11764,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ruben Van Assche", @@ -10979,7 +11776,11 @@ ], "description": "Create unified resources and data transfer objects", "homepage": "https://github.com/spatie/laravel-data", - "keywords": ["laravel", "laravel-data", "spatie"], + "keywords": [ + "laravel", + "laravel-data", + "spatie" + ], "support": { "issues": "https://github.com/spatie/laravel-data/issues", "source": "https://github.com/spatie/laravel-data/tree/3.11.0" @@ -11024,7 +11825,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Freek Van der Herten", @@ -11034,7 +11837,10 @@ ], "description": "Tools for creating Laravel packages", "homepage": "https://github.com/spatie/laravel-package-tools", - "keywords": ["laravel-package-tools", "spatie"], + "keywords": [ + "laravel-package-tools", + "spatie" + ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.2" @@ -11097,7 +11903,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ruben Van Assche", @@ -11178,7 +11986,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "A PHP library to create Swiss QR bills", "support": { "issues": "https://github.com/sprain/php-swiss-qr-bill/issues", @@ -11225,7 +12035,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Square Developer Platform", @@ -11235,7 +12047,11 @@ ], "description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.", "homepage": "https://squareup.com/developers", - "keywords": ["api", "sdk", "square"], + "keywords": [ + "api", + "sdk", + "square" + ], "support": { "issues": "https://github.com/square/square-php-sdk/issues", "source": "https://github.com/square/square-php-sdk/tree/30.0.0.20230816" @@ -11279,7 +12095,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Stripe and contributors", @@ -11288,7 +12106,11 @@ ], "description": "Stripe PHP Library", "homepage": "https://stripe.com/", - "keywords": ["api", "payment processing", "stripe"], + "keywords": [ + "api", + "payment processing", + "stripe" + ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", "source": "https://github.com/stripe/stripe-php/tree/v12.8.0" @@ -11325,10 +12147,14 @@ "psr-4": { "Symfony\\Component\\Mailer\\Bridge\\Brevo\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Pierre Tanguy", @@ -11409,10 +12235,14 @@ "psr-4": { "Symfony\\Component\\Console\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11425,7 +12255,12 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "keywords": ["cli", "command-line", "console", "terminal"], + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], "support": { "source": "https://github.com/symfony/console/tree/v6.4.2" }, @@ -11447,30 +12282,34 @@ }, { "name": "symfony/css-selector", - "version": "v6.4.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "d036c6c0d0b09e24a14a35f8292146a658f986e4" + "reference": "bb51d46e53ef8d50d523f0c5faedba056a27943e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/d036c6c0d0b09e24a14a35f8292146a658f986e4", - "reference": "d036c6c0d0b09e24a14a35f8292146a658f986e4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/bb51d46e53ef8d50d523f0c5faedba056a27943e", + "reference": "bb51d46e53ef8d50d523f0c5faedba056a27943e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\CssSelector\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11488,7 +12327,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.4.0" + "source": "https://github.com/symfony/css-selector/tree/v7.0.0" }, "funding": [ { @@ -11504,7 +12343,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T08:40:20+00:00" + "time": "2023-10-31T17:59:56+00:00" }, { "name": "symfony/deprecation-contracts", @@ -11534,10 +12373,14 @@ } }, "autoload": { - "files": ["function.php"] + "files": [ + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -11597,16 +12440,22 @@ "symfony/http-kernel": "^6.4|^7.0", "symfony/serializer": "^5.4|^6.0|^7.0" }, - "bin": ["Resources/bin/patch-type-declarations"], + "bin": [ + "Resources/bin/patch-type-declarations" + ], "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\ErrorHandler\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11640,24 +12489,24 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.4.2", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "e95216850555cd55e71b857eb9d6c2674124603a" + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e95216850555cd55e71b857eb9d6c2674124603a", - "reference": "e95216850555cd55e71b857eb9d6c2674124603a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/098b62ae81fdd6cbf941f355059f617db28f4f9a", + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4", + "symfony/dependency-injection": "<6.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -11666,23 +12515,27 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0|^7.0" + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11696,7 +12549,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.2" }, "funding": [ { @@ -11712,7 +12565,7 @@ "type": "tidelift" } ], - "time": "2023-12-27T22:16:42+00:00" + "time": "2023-12-27T22:24:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -11748,7 +12601,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -11812,10 +12667,14 @@ "psr-4": { "Symfony\\Component\\Filesystem\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11872,10 +12731,14 @@ "psr-4": { "Symfony\\Component\\Finder\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -11958,10 +12821,14 @@ "psr-4": { "Symfony\\Component\\HttpClient\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -11974,7 +12841,9 @@ ], "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", - "keywords": ["http"], + "keywords": [ + "http" + ], "support": { "source": "https://github.com/symfony/http-client/tree/v6.4.2" }, @@ -12025,10 +12894,14 @@ "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" }, - "exclude-from-classmap": ["/Test/"] + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -12106,10 +12979,14 @@ "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12215,10 +13092,14 @@ "psr-4": { "Symfony\\Component\\HttpKernel\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12252,35 +13133,39 @@ }, { "name": "symfony/intl", - "version": "v6.4.2", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "4f45148f7eb984ef12b1f7e123205ab904828839" + "reference": "5fbee19d24354bbd77b300971eb38469ddbfd7fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/4f45148f7eb984ef12b1f7e123205ab904828839", - "reference": "4f45148f7eb984ef12b1f7e123205ab904828839", + "url": "https://api.github.com/repos/symfony/intl/zipball/5fbee19d24354bbd77b300971eb38469ddbfd7fc", + "reference": "5fbee19d24354bbd77b300971eb38469ddbfd7fc", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Intl\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Bernhard Schussek", @@ -12310,7 +13195,7 @@ "localization" ], "support": { - "source": "https://github.com/symfony/intl/tree/v6.4.2" + "source": "https://github.com/symfony/intl/tree/v7.0.2" }, "funding": [ { @@ -12326,7 +13211,7 @@ "type": "tidelift" } ], - "time": "2023-12-26T18:38:00+00:00" + "time": "2023-12-27T08:42:13+00:00" }, { "name": "symfony/mailer", @@ -12369,10 +13254,14 @@ "psr-4": { "Symfony\\Component\\Mailer\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12434,10 +13323,14 @@ "psr-4": { "Symfony\\Component\\Mailer\\Bridge\\Mailgun\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12510,10 +13403,14 @@ "psr-4": { "Symfony\\Component\\Mime\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12526,7 +13423,10 @@ ], "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", - "keywords": ["mime", "mime-type"], + "keywords": [ + "mime", + "mime-type" + ], "support": { "source": "https://github.com/symfony/mime/tree/v6.4.0" }, @@ -12548,20 +13448,20 @@ }, { "name": "symfony/options-resolver", - "version": "v6.4.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "22301f0e7fdeaacc14318928612dee79be99860e" + "reference": "700ff4096e346f54cb628ea650767c8130f1001f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/22301f0e7fdeaacc14318928612dee79be99860e", - "reference": "22301f0e7fdeaacc14318928612dee79be99860e", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f", + "reference": "700ff4096e346f54cb628ea650767c8130f1001f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -12569,10 +13469,14 @@ "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -12585,9 +13489,13 @@ ], "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", - "keywords": ["config", "configuration", "options"], + "keywords": [ + "config", + "configuration", + "options" + ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.0.0" }, "funding": [ { @@ -12603,7 +13511,7 @@ "type": "tidelift" } ], - "time": "2023-08-08T10:16:24+00:00" + "time": "2023-08-08T10:20:21+00:00" }, { "name": "symfony/polyfill-ctype", @@ -12639,13 +13547,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Gert de Pagter", @@ -12658,7 +13570,12 @@ ], "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "ctype", "polyfill", "portable"], + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, @@ -12709,13 +13626,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -12786,15 +13707,23 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Intl\\Icu\\": "" }, - "classmap": ["Resources/stubs"], - "exclude-from-classmap": ["/Tests/"] + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -12867,13 +13796,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Laurent Bassin", @@ -12948,14 +13881,20 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, - "classmap": ["Resources/stubs"] + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13029,13 +13968,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13102,13 +14045,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Php72\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13121,7 +14068,12 @@ ], "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "polyfill", "portable", "shim"], + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, @@ -13169,14 +14121,20 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "classmap": ["Resources/stubs"] + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Ion Bazan", @@ -13193,7 +14151,12 @@ ], "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "polyfill", "portable", "shim"], + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, @@ -13242,14 +14205,20 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Php83\\": "" }, - "classmap": ["Resources/stubs"] + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13262,7 +14231,12 @@ ], "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "polyfill", "portable", "shim"], + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" }, @@ -13316,13 +14290,17 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Uuid\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Grégoire Pineau", @@ -13335,7 +14313,12 @@ ], "description": "Symfony polyfill for uuid functions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "polyfill", "portable", "uuid"], + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], "support": { "source": "https://github.com/symfony/polyfill-uuid/tree/v1.28.0" }, @@ -13386,10 +14369,14 @@ "psr-4": { "Symfony\\Component\\Mailer\\Bridge\\Postmark\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -13443,10 +14430,14 @@ "psr-4": { "Symfony\\Component\\Process\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -13521,10 +14512,14 @@ "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -13537,7 +14532,12 @@ ], "description": "PSR HTTP message bridge", "homepage": "http://symfony.com", - "keywords": ["http", "http-message", "psr-17", "psr-7"], + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" @@ -13596,10 +14596,14 @@ "psr-4": { "Symfony\\Component\\Routing\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -13612,7 +14616,12 @@ ], "description": "Maps an HTTP request to a set of configuration variables", "homepage": "https://symfony.com", - "keywords": ["router", "routing", "uri", "url"], + "keywords": [ + "router", + "routing", + "uri", + "url" + ], "support": { "source": "https://github.com/symfony/routing/tree/v6.4.2" }, @@ -13667,10 +14676,14 @@ "psr-4": { "Symfony\\Contracts\\Service\\": "" }, - "exclude-from-classmap": ["/Test/"] + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13712,20 +14725,20 @@ }, { "name": "symfony/string", - "version": "v6.4.2", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -13735,22 +14748,28 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { - "files": ["Resources/functions.php"], + "files": [ + "Resources/functions.php" + ], "psr-4": { "Symfony\\Component\\String\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13772,7 +14791,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.2" + "source": "https://github.com/symfony/string/tree/v7.0.2" }, "funding": [ { @@ -13788,7 +14807,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2023-12-10T16:54:46+00:00" }, { "name": "symfony/translation", @@ -13840,14 +14859,20 @@ }, "type": "library", "autoload": { - "files": ["Resources/functions.php"], + "files": [ + "Resources/functions.php" + ], "psr-4": { "Symfony\\Component\\Translation\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -13910,10 +14935,14 @@ "psr-4": { "Symfony\\Contracts\\Translation\\": "" }, - "exclude-from-classmap": ["/Test/"] + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -13979,10 +15008,14 @@ "psr-4": { "Symfony\\Component\\Uid\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Grégoire Pineau", @@ -13999,7 +15032,11 @@ ], "description": "Provides an object-oriented API to generate and represent UIDs", "homepage": "https://symfony.com", - "keywords": ["UID", "ulid", "uuid"], + "keywords": [ + "UID", + "ulid", + "uuid" + ], "support": { "source": "https://github.com/symfony/uid/tree/v6.4.0" }, @@ -14076,10 +15113,14 @@ "psr-4": { "Symfony\\Component\\Validator\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -14142,17 +15183,25 @@ "symfony/uid": "^5.4|^6.0|^7.0", "twig/twig": "^2.13|^3.0.4" }, - "bin": ["Resources/bin/var-dump-server"], + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", "autoload": { - "files": ["Resources/functions/dump.php"], + "files": [ + "Resources/functions/dump.php" + ], "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -14165,7 +15214,10 @@ ], "description": "Provides mechanisms for walking through any arbitrary PHP variable", "homepage": "https://symfony.com", - "keywords": ["debug", "dump"], + "keywords": [ + "debug", + "dump" + ], "support": { "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" }, @@ -14210,16 +15262,22 @@ "require-dev": { "symfony/console": "^5.4|^6.0|^7.0" }, - "bin": ["Resources/bin/yaml-lint"], + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -14286,7 +15344,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Tijs Verkoyen", @@ -14327,7 +15387,9 @@ "type": "library", "extra": { "laravel": { - "providers": ["Turbo124\\Beacon\\CollectorServiceProvider"], + "providers": [ + "Turbo124\\Beacon\\CollectorServiceProvider" + ], "aliases": { "Beacon": "Turbo124\\Beacon\\CollectorFacade" } @@ -14339,7 +15401,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "David Bomba", @@ -14349,7 +15413,12 @@ ], "description": "Application level data collector package for laravel", "homepage": "https://github.com/turbo124/beacon", - "keywords": ["beacon", "light logs", "lightlogs", "turbo124"], + "keywords": [ + "beacon", + "light logs", + "lightlogs", + "turbo124" + ], "support": { "source": "https://github.com/turbo124/beacon/tree/v1.5.2" }, @@ -14382,10 +15451,14 @@ "psr-4": { "Twig\\Extra\\Intl\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -14396,7 +15469,10 @@ ], "description": "A Twig extension for Intl", "homepage": "https://twig.symfony.com", - "keywords": ["intl", "twig"], + "keywords": [ + "intl", + "twig" + ], "support": { "source": "https://github.com/twigphp/intl-extra/tree/v3.8.0" }, @@ -14443,7 +15519,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Fabien Potencier", @@ -14463,7 +15541,9 @@ ], "description": "Twig, the flexible, fast, and secure template language for PHP", "homepage": "https://twig.symfony.com", - "keywords": ["templating"], + "keywords": [ + "templating" + ], "support": { "issues": "https://github.com/twigphp/Twig/issues", "source": "https://github.com/twigphp/Twig/tree/v3.8.0" @@ -14511,7 +15591,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Twilio API Team", @@ -14520,7 +15602,11 @@ ], "description": "A PHP wrapper for Twilio's API", "homepage": "https://github.com/twilio/twilio-php", - "keywords": ["api", "sms", "twilio"], + "keywords": [ + "api", + "sms", + "twilio" + ], "time": "2023-02-22T19:59:53+00:00" }, { @@ -14570,7 +15656,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Graham Campbell", @@ -14584,7 +15672,11 @@ } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": ["dotenv", "env", "environment"], + "keywords": [ + "dotenv", + "env", + "environment" + ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" @@ -14631,7 +15723,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Lars Moelleken", @@ -14640,7 +15734,11 @@ ], "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", "homepage": "https://github.com/voku/portable-ascii", - "keywords": ["ascii", "clean", "php"], + "keywords": [ + "ascii", + "clean", + "php" + ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", "source": "https://github.com/voku/portable-ascii/tree/2.0.1" @@ -14706,7 +15804,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Bernhard Schussek", @@ -14714,7 +15814,11 @@ } ], "description": "Assertions to validate method input/output with nice error messages.", - "keywords": ["assert", "check", "validate"], + "keywords": [ + "assert", + "check", + "validate" + ], "support": { "issues": "https://github.com/webmozarts/assert/issues", "source": "https://github.com/webmozarts/assert/tree/1.11.0" @@ -14754,10 +15858,14 @@ "psr-0": { "Webpatser\\Countries": "src/" }, - "classmap": ["src/commands"] + "classmap": [ + "src/commands" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Christoph Kempen", @@ -14772,7 +15880,12 @@ ], "description": "Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.", "homepage": "https://github.com/webpatser/laravel-countries", - "keywords": ["countries", "iso_3166_2", "iso_3166_3", "laravel"], + "keywords": [ + "countries", + "iso_3166_2", + "iso_3166_3", + "laravel" + ], "support": { "issues": "https://github.com/webpatser/laravel-countries/issues", "source": "https://github.com/webpatser/laravel-countries" @@ -14804,10 +15917,14 @@ } }, "autoload": { - "classmap": ["wepay.php"] + "classmap": [ + "wepay.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["Apache-2.0"], + "license": [ + "Apache-2.0" + ], "authors": [ { "name": "WePay", @@ -14815,7 +15932,11 @@ } ], "description": "WePay APIv2 SDK for PHP", - "keywords": ["payment", "sdk", "wepay"], + "keywords": [ + "payment", + "sdk", + "wepay" + ], "support": { "issues": "https://github.com/wepay/PHP-SDK/issues", "source": "https://github.com/wepay/PHP-SDK/tree/master" @@ -14850,7 +15971,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "The officially supported client for Postmark (http://postmarkapp.com)", "support": { "issues": "https://github.com/ActiveCampaign/postmark-php/issues", @@ -14894,20 +16017,26 @@ "dev-master": "3.8-dev" }, "laravel": { - "providers": ["Barryvdh\\Debugbar\\ServiceProvider"], + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], "aliases": { "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" } } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Barryvdh\\Debugbar\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Barry vd. Heuvel", @@ -14995,7 +16124,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Barry vd. Heuvel", @@ -15062,11 +16193,15 @@ }, "autoload": { "psr-0": { - "Barryvdh": ["src/"] + "Barryvdh": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Mike van Riel", @@ -15128,11 +16263,15 @@ "type": "library", "autoload": { "psr-4": { - "ParaTest\\": ["src/"] + "ParaTest\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Brian Scaturro", @@ -15147,7 +16286,12 @@ ], "description": "Parallel testing for PHP", "homepage": "https://github.com/paratestphp/paratest", - "keywords": ["concurrent", "parallel", "phpunit", "testing"], + "keywords": [ + "concurrent", + "parallel", + "phpunit", + "testing" + ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", "source": "https://github.com/paratestphp/paratest/tree/v7.3.1" @@ -15203,7 +16347,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jordi Boggiano", @@ -15212,7 +16358,9 @@ } ], "description": "Utilities to scan PHP code and generate class maps.", - "keywords": ["classmap"], + "keywords": [ + "classmap" + ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", "source": "https://github.com/composer/class-map-generator/tree/1.1.0" @@ -15267,7 +16415,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jordi Boggiano", @@ -15276,7 +16426,12 @@ } ], "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": ["PCRE", "preg", "regex", "regular expression"], + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], "support": { "issues": "https://github.com/composer/pcre/issues", "source": "https://github.com/composer/pcre/tree/3.1.1" @@ -15330,7 +16485,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nils Adermann", @@ -15349,7 +16506,12 @@ } ], "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": ["semantic", "semver", "validation", "versioning"], + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", @@ -15402,7 +16564,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "John Stevenson", @@ -15410,7 +16574,10 @@ } ], "description": "Restarts a process without Xdebug.", - "keywords": ["Xdebug", "performance"], + "keywords": [ + "Xdebug", + "performance" + ], "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", @@ -15467,7 +16634,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Théo FIDRY", @@ -15475,7 +16644,10 @@ } ], "description": "Tiny utility to get the number of CPU cores.", - "keywords": ["CPU", "core"], + "keywords": [ + "CPU", + "core" + ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" @@ -15527,7 +16699,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Filipe Dobreira", @@ -15559,16 +16733,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.47.0", + "version": "v3.48.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "184dd992fe49169a18300dba4435212db55220f7" + "reference": "a92472c6fb66349de25211f31c77eceae3df024e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/184dd992fe49169a18300dba4435212db55220f7", - "reference": "184dd992fe49169a18300dba4435212db55220f7", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a92472c6fb66349de25211f31c77eceae3df024e", + "reference": "a92472c6fb66349de25211f31c77eceae3df024e", "shasum": "" }, "require": { @@ -15606,7 +16780,9 @@ "ext-dom": "For handling output formats in XML", "ext-mbstring": "For handling non-UTF8 characters." }, - "bin": ["php-cs-fixer"], + "bin": [ + "php-cs-fixer" + ], "type": "application", "autoload": { "psr-4": { @@ -15614,7 +16790,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -15634,7 +16812,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.47.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.48.0" }, "funding": [ { @@ -15642,7 +16820,7 @@ "type": "github" } ], - "time": "2024-01-15T15:35:57+00:00" + "time": "2024-01-19T21:44:39+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -15677,12 +16855,18 @@ } }, "autoload": { - "classmap": ["hamcrest"] + "classmap": [ + "hamcrest" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "description": "This is the PHP port of Hamcrest Matchers", - "keywords": ["test"], + "keywords": [ + "test" + ], "support": { "issues": "https://github.com/hamcrest/hamcrest-php/issues", "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" @@ -15715,7 +16899,9 @@ "type": "library", "extra": { "laravel": { - "providers": ["Laracasts\\Cypress\\CypressServiceProvider"] + "providers": [ + "Laracasts\\Cypress\\CypressServiceProvider" + ] } }, "autoload": { @@ -15724,7 +16910,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Jeffrey Way", @@ -15734,7 +16922,10 @@ ], "description": "Laravel Cypress Boilerplate", "homepage": "https://github.com/laracasts/cypress", - "keywords": ["cypress", "laracasts"], + "keywords": [ + "cypress", + "laracasts" + ], "support": { "issues": "https://github.com/laracasts/cypress/issues", "source": "https://github.com/laracasts/cypress/tree/3.0.1" @@ -15783,7 +16974,9 @@ "dev-master": "2.0-dev" }, "phpstan": { - "includes": ["extension.neon"] + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -15792,7 +16985,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Can Vural", @@ -15878,7 +17073,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Maxime Bouroumeau-Fuseau", @@ -15892,7 +17089,10 @@ ], "description": "Debug bar in the browser for php application", "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": ["debug", "debugbar"], + "keywords": [ + "debug", + "debugbar" + ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", "source": "https://github.com/maximebf/php-debugbar/tree/v1.19.1" @@ -15927,13 +17127,18 @@ }, "type": "library", "autoload": { - "files": ["library/helpers.php", "library/Mockery.php"], + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], "psr-4": { "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Pádraic Brady", @@ -16005,13 +17210,17 @@ }, "type": "library", "autoload": { - "files": ["src/DeepCopy/deep_copy.php"], + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Create deep copies (clones) of your objects", "keywords": [ "clone", @@ -16078,13 +17287,17 @@ } }, "autoload": { - "files": ["./src/Adapters/Phpunit/Autoload.php"], + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], "psr-4": { "NunoMaduro\\Collision\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nuno Maduro", @@ -16152,10 +17365,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Arne Blankerts", @@ -16199,10 +17416,14 @@ }, "type": "library", "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Arne Blankerts", @@ -16278,7 +17499,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["GPL-2.0-or-later"], + "license": [ + "GPL-2.0-or-later" + ], "authors": [ { "name": "The phpMyAdmin Team", @@ -16332,15 +17555,25 @@ "conflict": { "phpstan/phpstan-shim": "*" }, - "bin": ["phpstan", "phpstan.phar"], + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", "autoload": { - "files": ["bootstrap.php"] + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "PHPStan - PHP Static Analysis Tool", - "keywords": ["dev", "static analysis"], + "keywords": [ + "dev", + "static analysis" + ], "support": { "docs": "https://phpstan.org/user-guide/getting-started", "forum": "https://github.com/phpstan/phpstan/discussions", @@ -16407,10 +17640,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16420,7 +17657,11 @@ ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": ["coverage", "testing", "xunit"], + "keywords": [ + "coverage", + "testing", + "xunit" + ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", @@ -16461,10 +17702,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16474,7 +17719,10 @@ ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": ["filesystem", "iterator"], + "keywords": [ + "filesystem", + "iterator" + ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", @@ -16519,10 +17767,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16532,7 +17784,9 @@ ], "description": "Invoke callables with a timeout", "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": ["process"], + "keywords": [ + "process" + ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" @@ -16572,10 +17826,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16585,7 +17843,9 @@ ], "description": "Simple template engine.", "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": ["template"], + "keywords": [ + "template" + ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", @@ -16626,10 +17886,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16639,7 +17903,9 @@ ], "description": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": ["timer"], + "keywords": [ + "timer" + ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" @@ -16654,16 +17920,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.7", + "version": "10.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8" + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e5c5b397a95cb0db013270a985726fcae93e61b8", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08f4fa74d5fbfff1ef22abffee47aaedcaea227e", + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e", "shasum": "" }, "require": { @@ -16697,7 +17963,9 @@ "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" }, - "bin": ["phpunit"], + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { @@ -16705,11 +17973,17 @@ } }, "autoload": { - "files": ["src/Framework/Assert/Functions.php"], - "classmap": ["src/"] + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16719,11 +17993,15 @@ ], "description": "The PHP Unit Testing framework.", "homepage": "https://phpunit.de/", - "keywords": ["phpunit", "testing", "xunit"], + "keywords": [ + "phpunit", + "testing", + "xunit" + ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.8" }, "funding": [ { @@ -16739,7 +18017,7 @@ "type": "tidelift" } ], - "time": "2024-01-14T16:40:30+00:00" + "time": "2024-01-19T07:07:27+00:00" }, { "name": "sebastian/cli-parser", @@ -16768,10 +18046,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16820,10 +18102,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16872,10 +18158,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16927,10 +18217,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -16951,7 +18245,11 @@ ], "description": "Provides the functionality to compare PHP values for equality", "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": ["comparator", "compare", "equality"], + "keywords": [ + "comparator", + "compare", + "equality" + ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", @@ -16993,10 +18291,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17047,10 +18349,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17063,7 +18369,12 @@ ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": ["diff", "udiff", "unidiff", "unified diff"], + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", @@ -17107,10 +18418,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17119,7 +18434,11 @@ ], "description": "Provides functionality to handle HHVM/PHP environments", "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": ["Xdebug", "environment", "hhvm"], + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", @@ -17162,10 +18481,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17190,7 +18513,10 @@ ], "description": "Provides the functionality to export PHP variables for visualization", "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": ["export", "exporter"], + "keywords": [ + "export", + "exporter" + ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", @@ -17234,10 +18560,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17246,7 +18576,9 @@ ], "description": "Snapshotting of global state", "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": ["global state"], + "keywords": [ + "global state" + ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", @@ -17288,10 +18620,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17343,10 +18679,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17394,10 +18734,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17445,10 +18789,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17504,10 +18852,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17553,10 +18905,14 @@ } }, "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Sebastian Bergmann", @@ -17608,7 +18964,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Freek Van de Herten", @@ -17619,7 +18977,10 @@ ], "description": "A better backtrace", "homepage": "https://github.com/spatie/backtrace", - "keywords": ["Backtrace", "spatie"], + "keywords": [ + "Backtrace", + "spatie" + ], "support": { "source": "https://github.com/spatie/backtrace/tree/1.5.3" }, @@ -17674,16 +19035,25 @@ } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Spatie\\FlareClient\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "description": "Send PHP errors to Flare", "homepage": "https://github.com/spatie/flare-client-php", - "keywords": ["exception", "flare", "reporting", "spatie"], + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", "source": "https://github.com/spatie/flare-client-php/tree/1.4.3" @@ -17747,7 +19117,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Spatie", @@ -17757,7 +19129,12 @@ ], "description": "A beautiful error page for PHP applications.", "homepage": "https://flareapp.io/ignition", - "keywords": ["error", "flare", "laravel", "page"], + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], "support": { "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", "forum": "https://twitter.com/flareappio", @@ -17824,13 +19201,17 @@ } }, "autoload": { - "files": ["src/helpers.php"], + "files": [ + "src/helpers.php" + ], "psr-4": { "Spatie\\LaravelIgnition\\": "src" } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Spatie", @@ -17840,7 +19221,12 @@ ], "description": "A beautiful error page for Laravel applications.", "homepage": "https://flareapp.io/ignition", - "keywords": ["error", "flare", "laravel", "page"], + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], "support": { "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", "forum": "https://twitter.com/flareappio", @@ -17886,7 +19272,9 @@ "type": "phpstan-extension", "extra": { "phpstan": { - "includes": ["extension.neon"] + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -17895,7 +19283,9 @@ } }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Michal Špaček", @@ -17904,7 +19294,9 @@ } ], "description": "Stripe SDK extension for PHPStan", - "keywords": ["static analysis"], + "keywords": [ + "static analysis" + ], "support": { "issues": "https://github.com/spaze/phpstan-stripe/issues", "source": "https://github.com/spaze/phpstan-stripe/tree/v3.1.0" @@ -17939,14 +19331,20 @@ } }, "autoload": { - "files": ["bootstrap.php"], + "files": [ + "bootstrap.php" + ], "psr-4": { "Symfony\\Polyfill\\Php81\\": "" }, - "classmap": ["Resources/stubs"] + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Nicolas Grekas", @@ -17959,7 +19357,12 @@ ], "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", - "keywords": ["compatibility", "polyfill", "portable", "shim"], + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, @@ -17981,20 +19384,20 @@ }, { "name": "symfony/stopwatch", - "version": "v6.4.0", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", + "reference": "7bbfa3dd564a0ce12eb4acaaa46823c740f9cb7a", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -18002,10 +19405,14 @@ "psr-4": { "Symfony\\Component\\Stopwatch\\": "" }, - "exclude-from-classmap": ["/Tests/"] + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["MIT"], + "license": [ + "MIT" + ], "authors": [ { "name": "Fabien Potencier", @@ -18019,7 +19426,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.4.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.0.0" }, "funding": [ { @@ -18035,7 +19442,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2023-07-05T13:06:06+00:00" }, { "name": "theseer/tokenizer", @@ -18059,10 +19466,14 @@ }, "type": "library", "autoload": { - "classmap": ["src/"] + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", - "license": ["BSD-3-Clause"], + "license": [ + "BSD-3-Clause" + ], "authors": [ { "name": "Arne Blankerts", From 33560bd6a63e409030fb03cca83ea1ef7e2ca455 Mon Sep 17 00:00:00 2001 From: paulwer Date: Sun, 18 Feb 2024 17:50:33 +0100 Subject: [PATCH 16/92] fixes for webhook-handlers --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 17 ++-- app/Jobs/PostMark/ProcessPostmarkWebhook.php | 94 +++++++++++--------- 2 files changed, 61 insertions(+), 50 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index fa0e85d1871a..17c2929e6b5f 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -52,6 +52,8 @@ class ProcessBrevoWebhook implements ShouldQueue 'events' => [], ]; + private ?Company $company = null; + /** * Create a new job instance. * @@ -86,12 +88,12 @@ class ProcessBrevoWebhook implements ShouldQueue public function handle() { MultiDB::findAndSetDbByCompanyKey($this->request['tags'][0]); - $company = Company::where('company_key', $this->request['tags'][0])->first(); + $this->company = Company::where('company_key', $this->request['tags'][0])->first(); $this->invitation = $this->discoverInvitation($this->request['message-id']); - if ($company && $this->request['event'] == 'spam' && config('ninja.notification.slack')) { - $company->notification(new EmailSpamNotification($company))->ninja(); + if ($this->company && $this->request['event'] == 'spam' && config('ninja.notification.slack')) { + $this->company->notification(new EmailSpamNotification($this->company))->ninja(); } if (!$this->invitation) { @@ -111,7 +113,7 @@ class ProcessBrevoWebhook implements ShouldQueue case 'blocked': if ($this->request['subject'] == ctrans('texts.confirmation_subject')) { - $company->notification(new EmailBounceNotification($this->request['email']))->ninja(); + $this->company->notification(new EmailBounceNotification($this->request['email']))->ninja(); } return $this->processBounce(); @@ -419,8 +421,10 @@ class ProcessBrevoWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $Brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', config('services.brevo.key'))); - $messageDetail = $Brevo->getTransacEmailContent($message_id); + $brevo_secret = $this->company->settings->brevo_secret ?? config('services.brevo.key'); + + $brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', $brevo_secret)); + $messageDetail = $brevo->getTransacEmailContent($message_id); return $messageDetail; } @@ -431,7 +435,6 @@ class ProcessBrevoWebhook implements ShouldQueue $messageDetail = $this->getRawMessage($message_id); - $event = collect($messageDetail->getEvents())->first(function ($event) { return $event?->Details?->BounceID ?? false; diff --git a/app/Jobs/PostMark/ProcessPostmarkWebhook.php b/app/Jobs/PostMark/ProcessPostmarkWebhook.php index 963a4c64f8a9..4d571999985b 100644 --- a/app/Jobs/PostMark/ProcessPostmarkWebhook.php +++ b/app/Jobs/PostMark/ProcessPostmarkWebhook.php @@ -45,7 +45,7 @@ class ProcessPostmarkWebhook implements ShouldQueue private $entity; - private array $default_response = [ + private array $default_response = [ 'recipients' => '', 'subject' => 'Message not found.', 'entity' => '', @@ -53,6 +53,8 @@ class ProcessPostmarkWebhook implements ShouldQueue 'events' => [], ]; + private ?Company $company = null; + /** * Create a new job instance. * @@ -64,11 +66,11 @@ class ProcessPostmarkWebhook implements ShouldQueue private function getSystemLog(string $message_id): ?SystemLog { return SystemLog::query() - ->where('company_id', $this->invitation->company_id) - ->where('type_id', SystemLog::TYPE_WEBHOOK_RESPONSE) - ->whereJsonContains('log', ['MessageID' => $message_id]) - ->orderBy('id', 'desc') - ->first(); + ->where('company_id', $this->invitation->company_id) + ->where('type_id', SystemLog::TYPE_WEBHOOK_RESPONSE) + ->whereJsonContains('log', ['MessageID' => $message_id]) + ->orderBy('id', 'desc') + ->first(); } @@ -87,12 +89,12 @@ class ProcessPostmarkWebhook implements ShouldQueue public function handle() { MultiDB::findAndSetDbByCompanyKey($this->request['Tag']); - $company = Company::where('company_key', $this->request['Tag'])->first(); + $this->company = Company::where('company_key', $this->request['Tag'])->first(); $this->invitation = $this->discoverInvitation($this->request['MessageID']); - if ($company && $this->request['RecordType'] == 'SpamComplaint' && config('ninja.notification.slack')) { - $company->notification(new EmailSpamNotification($company))->ninja(); + if ($this->company && $this->request['RecordType'] == 'SpamComplaint' && config('ninja.notification.slack')) { + $this->company->notification(new EmailSpamNotification($this->company))->ninja(); } if (!$this->invitation) { @@ -108,8 +110,8 @@ class ProcessPostmarkWebhook implements ShouldQueue return $this->processDelivery(); case 'Bounce': - if($this->request['Subject'] == ctrans('texts.confirmation_subject')) { - $company->notification(new EmailBounceNotification($this->request['Email']))->ninja(); + if ($this->request['Subject'] == ctrans('texts.confirmation_subject')) { + $this->company->notification(new EmailBounceNotification($this->request['Email']))->ninja(); } return $this->processBounce(); @@ -169,19 +171,21 @@ class ProcessPostmarkWebhook implements ShouldQueue $sl = $this->getSystemLog($this->request['MessageID']); - if($sl) { + if ($sl) { $this->updateSystemLog($sl, $data); return; } - (new SystemLogger( - $data, - SystemLog::CATEGORY_MAIL, - SystemLog::EVENT_MAIL_OPENED, - SystemLog::TYPE_WEBHOOK_RESPONSE, - $this->invitation->contact->client, - $this->invitation->company - ))->handle(); + ( + new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_OPENED, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ) + )->handle(); } // { @@ -207,19 +211,21 @@ class ProcessPostmarkWebhook implements ShouldQueue $sl = $this->getSystemLog($this->request['MessageID']); - if($sl) { + if ($sl) { $this->updateSystemLog($sl, $data); return; } - (new SystemLogger( - $data, - SystemLog::CATEGORY_MAIL, - SystemLog::EVENT_MAIL_DELIVERY, - SystemLog::TYPE_WEBHOOK_RESPONSE, - $this->invitation->contact->client, - $this->invitation->company - ))->handle(); + ( + new SystemLogger( + $data, + SystemLog::CATEGORY_MAIL, + SystemLog::EVENT_MAIL_DELIVERY, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $this->invitation->contact->client, + $this->invitation->company + ) + )->handle(); } // { @@ -265,7 +271,7 @@ class ProcessPostmarkWebhook implements ShouldQueue $sl = $this->getSystemLog($this->request['MessageID']); - if($sl) { + if ($sl) { $this->updateSystemLog($sl, $data); return; } @@ -316,7 +322,7 @@ class ProcessPostmarkWebhook implements ShouldQueue $sl = $this->getSystemLog($this->request['MessageID']); - if($sl) { + if ($sl) { $this->updateSystemLog($sl, $data); } @@ -362,7 +368,7 @@ class ProcessPostmarkWebhook implements ShouldQueue $messageDetail = $this->getRawMessage($message_id); - $event = collect($messageDetail->messageevents)->first(function ($event) { + $event = collect($messageDetail->messageevents)->first(function ($event) { return $event?->Details?->BounceID ?? false; @@ -374,29 +380,31 @@ class ProcessPostmarkWebhook implements ShouldQueue private function fetchMessage(): array { - if(strlen($this->request['MessageID']) < 1) { + if (strlen($this->request['MessageID']) < 1) { return $this->default_response; } try { - $postmark = new PostmarkClient(config('services.postmark.token')); + $postmark_secret = $this->company->settings->postmark_secret ?? config('services.postmark.token'); + + $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']); $recipients = collect($messageDetail['recipients'])->flatten()->implode(','); $subject = $messageDetail->subject ?? ''; - $events = collect($messageDetail->messageevents)->map(function ($event) { + $events = collect($messageDetail->messageevents)->map(function ($event) { return [ - 'bounce_id' => $event?->Details?->BounceID ?? '', - 'recipient' => $event->Recipient ?? '', - 'status' => $event->Type ?? '', - 'delivery_message' => $event->Details->DeliveryMessage ?? $event->Details->Summary ?? '', - 'server' => $event->Details->DestinationServer ?? '', - 'server_ip' => $event->Details->DestinationIP ?? '', - 'date' => \Carbon\Carbon::parse($event->ReceivedAt)->format('Y-m-d H:i:s') ?? '', - ]; + 'bounce_id' => $event?->Details?->BounceID ?? '', + 'recipient' => $event->Recipient ?? '', + 'status' => $event->Type ?? '', + 'delivery_message' => $event->Details->DeliveryMessage ?? $event->Details->Summary ?? '', + 'server' => $event->Details->DestinationServer ?? '', + 'server_ip' => $event->Details->DestinationIP ?? '', + 'date' => \Carbon\Carbon::parse($event->ReceivedAt)->format('Y-m-d H:i:s') ?? '', + ]; })->toArray(); From 5d676cb6de174f60e440a0eba968c4507a8f954e Mon Sep 17 00:00:00 2001 From: paulwer Date: Tue, 27 Feb 2024 07:36:32 +0100 Subject: [PATCH 17/92] requested fixes --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 2 +- app/Jobs/PostMark/ProcessPostmarkWebhook.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 17c2929e6b5f..122d030e7454 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -421,7 +421,7 @@ class ProcessBrevoWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $brevo_secret = $this->company->settings->brevo_secret ?? config('services.brevo.key'); + $brevo_secret = isset($this->company->settings->brevo_secret) && trim($this->company->settings->brevo_secret) != '' ? $this->company->settings->brevo_secret : config('services.brevo.key'); $brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', $brevo_secret)); $messageDetail = $brevo->getTransacEmailContent($message_id); diff --git a/app/Jobs/PostMark/ProcessPostmarkWebhook.php b/app/Jobs/PostMark/ProcessPostmarkWebhook.php index 4d571999985b..0b3a040c009e 100644 --- a/app/Jobs/PostMark/ProcessPostmarkWebhook.php +++ b/app/Jobs/PostMark/ProcessPostmarkWebhook.php @@ -355,7 +355,9 @@ class ProcessPostmarkWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $postmark = new PostmarkClient(config('services.postmark.token')); + $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); + + $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($message_id); return $messageDetail; @@ -386,7 +388,7 @@ class ProcessPostmarkWebhook implements ShouldQueue try { - $postmark_secret = $this->company->settings->postmark_secret ?? config('services.postmark.token'); + $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']); From 653af74cfb789e8116e3e4ca2845d4dfab474052 Mon Sep 17 00:00:00 2001 From: paulwer Date: Sun, 3 Mar 2024 08:33:17 +0100 Subject: [PATCH 18/92] fixes --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 2 +- app/Jobs/PostMark/ProcessPostmarkWebhook.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 122d030e7454..92959f7d2e8b 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -421,7 +421,7 @@ class ProcessBrevoWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $brevo_secret = isset($this->company->settings->brevo_secret) && trim($this->company->settings->brevo_secret) != '' ? $this->company->settings->brevo_secret : config('services.brevo.key'); + $brevo_secret = !empty($this->company->settings->brevo_secret) ? $this->company->settings->brevo_secret : config('services.brevo.key'); $brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', $brevo_secret)); $messageDetail = $brevo->getTransacEmailContent($message_id); diff --git a/app/Jobs/PostMark/ProcessPostmarkWebhook.php b/app/Jobs/PostMark/ProcessPostmarkWebhook.php index 0b3a040c009e..1664cbafdcc7 100644 --- a/app/Jobs/PostMark/ProcessPostmarkWebhook.php +++ b/app/Jobs/PostMark/ProcessPostmarkWebhook.php @@ -355,7 +355,7 @@ class ProcessPostmarkWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); + $postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token'); $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($message_id); @@ -388,7 +388,7 @@ class ProcessPostmarkWebhook implements ShouldQueue try { - $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); + $postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token'); $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']); From 8fe73e9be97e5fde9c3ffbb2d05c18ba2875cc01 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 08:03:38 +0100 Subject: [PATCH 19/92] Refactor e-invoicing to allow more types for quotes, po, ... --- .../{Invoice => EInvoice}/CreateEInvoice.php | 7 ++++--- app/Livewire/PdfSlot.php | 2 +- .../Standards}/FacturaEInvoice.php | 2 +- .../Standards}/FatturaPA.php | 2 +- .../Standards}/RoEInvoice.php | 12 ++++++------ .../Standards}/ZugferdEInvoice.php | 2 +- app/Services/Invoice/InvoiceService.php | 18 +++++++++--------- app/Services/Pdf/PdfService.php | 2 +- tests/Feature/EInvoice/FacturaeTest.php | 5 ++--- tests/Feature/EInvoice/FatturaPATest.php | 4 ++-- tests/Unit/EInvoiceTest.php | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) rename app/Jobs/{Invoice => EInvoice}/CreateEInvoice.php (93%) rename app/Services/{Invoice/EInvoice => EInvoicing/Standards}/FacturaEInvoice.php (99%) rename app/Services/{Invoice/EInvoice => EInvoicing/Standards}/FatturaPA.php (99%) rename app/Services/{Invoice/EInvoice => EInvoicing/Standards}/RoEInvoice.php (99%) rename app/Services/{Invoice/EInvoice => EInvoicing/Standards}/ZugferdEInvoice.php (99%) diff --git a/app/Jobs/Invoice/CreateEInvoice.php b/app/Jobs/EInvoice/CreateEInvoice.php similarity index 93% rename from app/Jobs/Invoice/CreateEInvoice.php rename to app/Jobs/EInvoice/CreateEInvoice.php index 0ea7ae8a96d8..204bb9e036b2 100644 --- a/app/Jobs/Invoice/CreateEInvoice.php +++ b/app/Jobs/EInvoice/CreateEInvoice.php @@ -9,11 +9,11 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Jobs\Invoice; +namespace App\Jobs\EInvoice; use App\Models\Invoice; -use App\Services\Invoice\EInvoice\FacturaEInvoice; -use App\Services\Invoice\EInvoice\ZugferdEInvoice; +use App\Services\EInvoicing\Standards\FacturaEInvoice; +use App\Services\EInvoicing\Standards\ZugferdEInvoice; use App\Utils\Ninja; use horstoeko\zugferd\ZugferdDocumentBuilder; use Illuminate\Bus\Queueable; @@ -22,6 +22,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\App; +use function App\Jobs\Invoice\app; class CreateEInvoice implements ShouldQueue { diff --git a/app/Livewire/PdfSlot.php b/app/Livewire/PdfSlot.php index 1322d6a9664f..b81d5d9d3e4c 100644 --- a/app/Livewire/PdfSlot.php +++ b/app/Livewire/PdfSlot.php @@ -12,7 +12,7 @@ namespace App\Livewire; -use App\Jobs\Invoice\CreateEInvoice; +use App\Jobs\EInvoice\CreateEInvoice; use App\Libraries\MultiDB; use App\Models\CreditInvitation; use App\Models\InvoiceInvitation; diff --git a/app/Services/Invoice/EInvoice/FacturaEInvoice.php b/app/Services/EInvoicing/Standards/FacturaEInvoice.php similarity index 99% rename from app/Services/Invoice/EInvoice/FacturaEInvoice.php rename to app/Services/EInvoicing/Standards/FacturaEInvoice.php index e4b7f28bd905..623fe724d172 100644 --- a/app/Services/Invoice/EInvoice/FacturaEInvoice.php +++ b/app/Services/EInvoicing/Standards/FacturaEInvoice.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Services\Invoice\EInvoice; +namespace App\Services\EInvoicing\Standards; use App\Models\Invoice; use App\Models\PaymentType; diff --git a/app/Services/Invoice/EInvoice/FatturaPA.php b/app/Services/EInvoicing/Standards/FatturaPA.php similarity index 99% rename from app/Services/Invoice/EInvoice/FatturaPA.php rename to app/Services/EInvoicing/Standards/FatturaPA.php index 2c448c7cfa1b..7b40e9c8b33f 100644 --- a/app/Services/Invoice/EInvoice/FatturaPA.php +++ b/app/Services/EInvoicing/Standards/FatturaPA.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Services\Invoice\EInvoice; +namespace App\Services\EInvoicing\Standards; use App\Models\Invoice; use App\Services\AbstractService; diff --git a/app/Services/Invoice/EInvoice/RoEInvoice.php b/app/Services/EInvoicing/Standards/RoEInvoice.php similarity index 99% rename from app/Services/Invoice/EInvoice/RoEInvoice.php rename to app/Services/EInvoicing/Standards/RoEInvoice.php index d01aae492022..4a8ce29969e9 100644 --- a/app/Services/Invoice/EInvoice/RoEInvoice.php +++ b/app/Services/EInvoicing/Standards/RoEInvoice.php @@ -9,28 +9,28 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Services\Invoice\EInvoice; +namespace App\Services\EInvoicing\Standards; use App\Models\Invoice; use App\Services\AbstractService; use CleverIt\UBL\Invoice\Address; +use CleverIt\UBL\Invoice\ClassifiedTaxCategory; use CleverIt\UBL\Invoice\Contact; use CleverIt\UBL\Invoice\Country; use CleverIt\UBL\Invoice\Generator; use CleverIt\UBL\Invoice\Invoice as UBLInvoice; use CleverIt\UBL\Invoice\InvoiceLine; use CleverIt\UBL\Invoice\Item; +use CleverIt\UBL\Invoice\LegalEntity; use CleverIt\UBL\Invoice\LegalMonetaryTotal; use CleverIt\UBL\Invoice\Party; +use CleverIt\UBL\Invoice\PayeeFinancialAccount; +use CleverIt\UBL\Invoice\PaymentMeans; +use CleverIt\UBL\Invoice\Price; use CleverIt\UBL\Invoice\TaxCategory; use CleverIt\UBL\Invoice\TaxScheme; use CleverIt\UBL\Invoice\TaxSubTotal; use CleverIt\UBL\Invoice\TaxTotal; -use CleverIt\UBL\Invoice\PaymentMeans; -use CleverIt\UBL\Invoice\PayeeFinancialAccount; -use CleverIt\UBL\Invoice\LegalEntity; -use CleverIt\UBL\Invoice\ClassifiedTaxCategory; -use CleverIt\UBL\Invoice\Price; class RoEInvoice extends AbstractService { diff --git a/app/Services/Invoice/EInvoice/ZugferdEInvoice.php b/app/Services/EInvoicing/Standards/ZugferdEInvoice.php similarity index 99% rename from app/Services/Invoice/EInvoice/ZugferdEInvoice.php rename to app/Services/EInvoicing/Standards/ZugferdEInvoice.php index 59ab32605a58..c08cbe7d1fb7 100644 --- a/app/Services/Invoice/EInvoice/ZugferdEInvoice.php +++ b/app/Services/EInvoicing/Standards/ZugferdEInvoice.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -namespace App\Services\Invoice\EInvoice; +namespace App\Services\EInvoicing\Standards; use App\Models\Invoice; use App\Models\Product; diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index effe34daceba..5d13c90c473b 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -11,21 +11,21 @@ namespace App\Services\Invoice; -use App\Models\Task; -use App\Utils\Ninja; +use App\Events\Invoice\InvoiceWasArchived; +use App\Jobs\EInvoice\CreateEInvoice; +use App\Jobs\Entity\CreateRawPdf; +use App\Jobs\Inventory\AdjustProductInventory; +use App\Libraries\Currency\Conversion\CurrencyApi; +use App\Models\CompanyGateway; use App\Models\Expense; use App\Models\Invoice; use App\Models\Payment; use App\Models\Subscription; -use App\Models\CompanyGateway; -use Illuminate\Support\Carbon; +use App\Models\Task; +use App\Utils\Ninja; use App\Utils\Traits\MakesHash; -use App\Jobs\Entity\CreateRawPdf; -use App\Jobs\Invoice\CreateEInvoice; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Storage; -use App\Events\Invoice\InvoiceWasArchived; -use App\Jobs\Inventory\AdjustProductInventory; -use App\Libraries\Currency\Conversion\CurrencyApi; class InvoiceService { diff --git a/app/Services/Pdf/PdfService.php b/app/Services/Pdf/PdfService.php index e0db7d406419..81162798c0e5 100644 --- a/app/Services/Pdf/PdfService.php +++ b/app/Services/Pdf/PdfService.php @@ -11,7 +11,7 @@ namespace App\Services\Pdf; -use App\Jobs\Invoice\CreateEInvoice; +use App\Jobs\EInvoice\CreateEInvoice; use App\Models\Company; use App\Models\CreditInvitation; use App\Models\Invoice; diff --git a/tests/Feature/EInvoice/FacturaeTest.php b/tests/Feature/EInvoice/FacturaeTest.php index 6909a79fc2a6..d070ab388e6d 100644 --- a/tests/Feature/EInvoice/FacturaeTest.php +++ b/tests/Feature/EInvoice/FacturaeTest.php @@ -11,7 +11,6 @@ namespace Tests\Feature\EInvoice; -use App\Services\Invoice\EInvoice\FacturaEInvoice; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Support\Facades\Storage; @@ -40,11 +39,11 @@ class FacturaeTest extends TestCase public function testInvoiceGeneration() { - $f = new FacturaEInvoice($this->invoice, "3.2.2"); + $f = new \App\Services\EInvoicing\Standards\FacturaEInvoice($this->invoice, "3.2.2"); $path = $f->run(); $this->assertNotNull($f->run()); - + // nlog($f->run()); // $this->assertTrue($this->validateInvoiceXML($path)); diff --git a/tests/Feature/EInvoice/FatturaPATest.php b/tests/Feature/EInvoice/FatturaPATest.php index dfe243f55823..f6c63d0653ec 100644 --- a/tests/Feature/EInvoice/FatturaPATest.php +++ b/tests/Feature/EInvoice/FatturaPATest.php @@ -11,7 +11,7 @@ namespace Tests\Feature\EInvoice; -use App\Services\Invoice\EInvoice\FatturaPA; +use App\Services\EInvoicing\Standards\FatturaPA; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Routing\Middleware\ThrottleRequests; use Tests\MockAccountData; @@ -42,7 +42,7 @@ class FatturaPATest extends TestCase $xml = $fat->run(); // nlog($xml); - + $this->assertnotNull($xml); } } diff --git a/tests/Unit/EInvoiceTest.php b/tests/Unit/EInvoiceTest.php index 7f0925d1cdff..4b8977dc50e2 100644 --- a/tests/Unit/EInvoiceTest.php +++ b/tests/Unit/EInvoiceTest.php @@ -9,8 +9,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +use App\Jobs\EInvoice\CreateEInvoice; use App\Jobs\Entity\CreateRawPdf; -use App\Jobs\Invoice\CreateEInvoice; use horstoeko\zugferd\ZugferdDocumentReader; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Routing\Middleware\ThrottleRequests; From 99d6ac5a7044772aabac7d89195a067c507f1f0e Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 08:13:34 +0100 Subject: [PATCH 20/92] Rename some files, added additional checks for more file types in CreateEDocument.php --- app/Jobs/EDocument/CreateEDocument.php | 130 ++++++++++++++++++ app/Jobs/EInvoice/CreateEInvoice.php | 87 ------------ app/Livewire/PdfSlot.php | 4 +- .../Standards/FacturaEInvoice.php | 0 .../Standards/FatturaPA.php | 0 .../Standards/RoEInvoice.php | 0 .../Standards/ZugferdEDokument.php} | 2 +- app/Services/Invoice/InvoiceService.php | 4 +- app/Services/Pdf/PdfService.php | 4 +- tests/Unit/EInvoiceTest.php | 6 +- 10 files changed, 140 insertions(+), 97 deletions(-) create mode 100644 app/Jobs/EDocument/CreateEDocument.php delete mode 100644 app/Jobs/EInvoice/CreateEInvoice.php rename app/Services/{EInvoicing => EDocument}/Standards/FacturaEInvoice.php (100%) rename app/Services/{EInvoicing => EDocument}/Standards/FatturaPA.php (100%) rename app/Services/{EInvoicing => EDocument}/Standards/RoEInvoice.php (100%) rename app/Services/{EInvoicing/Standards/ZugferdEInvoice.php => EDocument/Standards/ZugferdEDokument.php} (99%) diff --git a/app/Jobs/EDocument/CreateEDocument.php b/app/Jobs/EDocument/CreateEDocument.php new file mode 100644 index 000000000000..07e967c0b399 --- /dev/null +++ b/app/Jobs/EDocument/CreateEDocument.php @@ -0,0 +1,130 @@ +document->client->locale()); + + /* Set customized translations _NOW_ */ + $t->replace(Ninja::transformTranslations($this->document->client->getMergedSettings())); + + $e_document_type = $this->document->client->getSetting('e_invoice_type'); + if ($this->document instanceof Invoice){ + switch ($e_document_type) { + case "EN16931": + case "XInvoice_3_0": + case "XInvoice_2_3": + case "XInvoice_2_2": + case "XInvoice_2_1": + case "XInvoice_2_0": + case "XInvoice_1_0": + case "XInvoice-Extended": + case "XInvoice-BasicWL": + case "XInvoice-Basic": + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + + return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + case "Facturae_3.2": + case "Facturae_3.2.1": + case "Facturae_3.2.2": + return (new FacturaEInvoice($this->invoice, str_replace("Facturae_", "", $e_invoice_type)))->run(); + default: + + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + + return $this->returnObject ? $zugferd : $zugferd->getXml(); + + } + } + elseif ($this->document instanceof Quote){ + switch ($e_document_type){ + case "EN16931": + case "XInvoice_3_0": + case "XInvoice_2_3": + case "XInvoice_2_2": + case "XInvoice_2_1": + case "XInvoice_2_0": + case "XInvoice_1_0": + case "XInvoice-Extended": + case "XInvoice-BasicWL": + case "XInvoice-Basic": + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + default: + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + return $this->returnObject ? $zugferd : $zugferd->getXml(); + } + } + elseif ($this->document instanceof PurchaseOrder){ + switch ($e_document_type){ + case "EN16931": + case "XInvoice_3_0": + case "XInvoice_2_3": + case "XInvoice_2_2": + case "XInvoice_2_1": + case "XInvoice_2_0": + case "XInvoice_1_0": + case "XInvoice-Extended": + case "XInvoice-BasicWL": + case "XInvoice-Basic": + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + default: + $zugferd = (new ZugferdEDokument($this->invoice))->run(); + return $this->returnObject ? $zugferd : $zugferd->getXml(); + } + } + else{ + return ""; + } + } +} diff --git a/app/Jobs/EInvoice/CreateEInvoice.php b/app/Jobs/EInvoice/CreateEInvoice.php deleted file mode 100644 index 204bb9e036b2..000000000000 --- a/app/Jobs/EInvoice/CreateEInvoice.php +++ /dev/null @@ -1,87 +0,0 @@ -invoice->client->locale()); - - /* Set customized translations _NOW_ */ - $t->replace(Ninja::transformTranslations($this->invoice->client->getMergedSettings())); - - $e_invoice_type = $this->invoice->client->getSetting('e_invoice_type'); - - switch ($e_invoice_type) { - case "EN16931": - case "XInvoice_3_0": - case "XInvoice_2_3": - case "XInvoice_2_2": - case "XInvoice_2_1": - case "XInvoice_2_0": - case "XInvoice_1_0": - case "XInvoice-Extended": - case "XInvoice-BasicWL": - case "XInvoice-Basic": - $zugferd = (new ZugferdEInvoice($this->invoice))->run(); - - return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); - case "Facturae_3.2": - case "Facturae_3.2.1": - case "Facturae_3.2.2": - return (new FacturaEInvoice($this->invoice, str_replace("Facturae_", "", $e_invoice_type)))->run(); - default: - - $zugferd = (new ZugferdEInvoice($this->invoice))->run(); - - return $this->returnObject ? $zugferd : $zugferd->getXml(); - - } - - } -} diff --git a/app/Livewire/PdfSlot.php b/app/Livewire/PdfSlot.php index b81d5d9d3e4c..81ad1fab61c1 100644 --- a/app/Livewire/PdfSlot.php +++ b/app/Livewire/PdfSlot.php @@ -12,7 +12,7 @@ namespace App\Livewire; -use App\Jobs\EInvoice\CreateEInvoice; +use App\Jobs\EDocument\CreateEDocument; use App\Libraries\MultiDB; use App\Models\CreditInvitation; use App\Models\InvoiceInvitation; @@ -113,7 +113,7 @@ class PdfSlot extends Component $file_name = $this->entity->numberFormatter().'.xml'; - $file = (new CreateEInvoice($this->entity))->handle(); + $file = (new CreateEDocument($this->entity))->handle(); $headers = ['Content-Type' => 'application/xml']; diff --git a/app/Services/EInvoicing/Standards/FacturaEInvoice.php b/app/Services/EDocument/Standards/FacturaEInvoice.php similarity index 100% rename from app/Services/EInvoicing/Standards/FacturaEInvoice.php rename to app/Services/EDocument/Standards/FacturaEInvoice.php diff --git a/app/Services/EInvoicing/Standards/FatturaPA.php b/app/Services/EDocument/Standards/FatturaPA.php similarity index 100% rename from app/Services/EInvoicing/Standards/FatturaPA.php rename to app/Services/EDocument/Standards/FatturaPA.php diff --git a/app/Services/EInvoicing/Standards/RoEInvoice.php b/app/Services/EDocument/Standards/RoEInvoice.php similarity index 100% rename from app/Services/EInvoicing/Standards/RoEInvoice.php rename to app/Services/EDocument/Standards/RoEInvoice.php diff --git a/app/Services/EInvoicing/Standards/ZugferdEInvoice.php b/app/Services/EDocument/Standards/ZugferdEDokument.php similarity index 99% rename from app/Services/EInvoicing/Standards/ZugferdEInvoice.php rename to app/Services/EDocument/Standards/ZugferdEDokument.php index c08cbe7d1fb7..ce295c74d3e7 100644 --- a/app/Services/EInvoicing/Standards/ZugferdEInvoice.php +++ b/app/Services/EDocument/Standards/ZugferdEDokument.php @@ -18,7 +18,7 @@ use horstoeko\zugferd\codelists\ZugferdDutyTaxFeeCategories; use horstoeko\zugferd\ZugferdDocumentBuilder; use horstoeko\zugferd\ZugferdProfiles; -class ZugferdEInvoice extends AbstractService +class ZugferdEDokument extends AbstractService { public ZugferdDocumentBuilder $xrechnung; diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 5d13c90c473b..c6adb7457b2c 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -12,7 +12,7 @@ namespace App\Services\Invoice; use App\Events\Invoice\InvoiceWasArchived; -use App\Jobs\EInvoice\CreateEInvoice; +use App\Jobs\EDocument\CreateEDocument; use App\Jobs\Entity\CreateRawPdf; use App\Jobs\Inventory\AdjustProductInventory; use App\Libraries\Currency\Conversion\CurrencyApi; @@ -201,7 +201,7 @@ class InvoiceService public function getEInvoice($contact = null) { - return (new CreateEInvoice($this->invoice))->handle(); + return (new CreateEDocument($this->invoice))->handle(); } public function sendEmail($contact = null) diff --git a/app/Services/Pdf/PdfService.php b/app/Services/Pdf/PdfService.php index 81162798c0e5..4a579db80c52 100644 --- a/app/Services/Pdf/PdfService.php +++ b/app/Services/Pdf/PdfService.php @@ -11,7 +11,7 @@ namespace App\Services\Pdf; -use App\Jobs\EInvoice\CreateEInvoice; +use App\Jobs\EDocument\CreateEDocument; use App\Models\Company; use App\Models\CreditInvitation; use App\Models\Invoice; @@ -216,7 +216,7 @@ class PdfService { try { - $e_rechnung = (new CreateEInvoice($this->config->entity, true))->handle(); + $e_rechnung = (new CreateEDocument($this->config->entity, true))->handle(); $pdfBuilder = new ZugferdDocumentPdfBuilder($e_rechnung, $pdf); $pdfBuilder->generateDocument(); diff --git a/tests/Unit/EInvoiceTest.php b/tests/Unit/EInvoiceTest.php index 4b8977dc50e2..08c8edf34c91 100644 --- a/tests/Unit/EInvoiceTest.php +++ b/tests/Unit/EInvoiceTest.php @@ -9,7 +9,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ -use App\Jobs\EInvoice\CreateEInvoice; +use App\Jobs\EDocument\CreateEDocument; use App\Jobs\Entity\CreateRawPdf; use horstoeko\zugferd\ZugferdDocumentReader; use Illuminate\Foundation\Testing\DatabaseTransactions; @@ -41,7 +41,7 @@ class EInvoiceTest extends TestCase $this->company->e_invoice_type = "EN16931"; $this->invoice->client->routing_id = 'DE123456789'; $this->invoice->client->save(); - $e_invoice = (new CreateEInvoice($this->invoice))->handle(); + $e_invoice = (new CreateEDocument($this->invoice))->handle(); $this->assertIsString($e_invoice); } @@ -54,7 +54,7 @@ class EInvoiceTest extends TestCase $this->invoice->client->routing_id = 'DE123456789'; $this->invoice->client->save(); - $e_invoice = (new CreateEInvoice($this->invoice))->handle(); + $e_invoice = (new CreateEDocument($this->invoice))->handle(); $document = ZugferdDocumentReader::readAndGuessFromContent($e_invoice); $document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest); $this->assertEquals($this->invoice->number, $documentno); From 8c066989807a4fe08dd0367176a468ef35c7f47d Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 15:23:52 +0100 Subject: [PATCH 21/92] Add new functions to Quote and PO-Service --- app/Models/Client.php | 2 +- app/Services/Invoice/InvoiceService.php | 4 +-- .../PurchaseOrder/PurchaseOrderService.php | 28 +++++++++++++++++++ app/Services/Quote/QuoteService.php | 27 ++++++++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/app/Models/Client.php b/app/Models/Client.php index 61bda7230946..259b9c03b97b 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -754,7 +754,7 @@ class Client extends BaseModel implements HasLocalePreference return $this->company->company_key.'/'.$this->client_hash.'/'.$contact_key.'/invoices/'; } - public function e_invoice_filepath($invitation): string + public function e_document_filepath($invitation): string { $contact_key = $invitation->contact->contact_key; diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index c6adb7457b2c..34676eaca1cf 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -409,12 +409,12 @@ class InvoiceService $this->invoice->invitations->each(function ($invitation) { try { // if (Storage::disk(config('filesystems.default'))->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { - Storage::disk(config('filesystems.default'))->delete($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml")); + Storage::disk(config('filesystems.default'))->delete($this->invoice->client->e_document_filepath($invitation).$this->invoice->getFileName("xml")); // } // if (Ninja::isHosted() && Storage::disk('public')->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { if (Ninja::isHosted()) { - Storage::disk('public')->delete($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml")); + Storage::disk('public')->delete($this->invoice->client->e_document_filepath($invitation).$this->invoice->getFileName("xml")); } } catch (\Exception $e) { nlog($e->getMessage()); diff --git a/app/Services/PurchaseOrder/PurchaseOrderService.php b/app/Services/PurchaseOrder/PurchaseOrderService.php index b7bc07cb2c77..126b0c99c16d 100644 --- a/app/Services/PurchaseOrder/PurchaseOrderService.php +++ b/app/Services/PurchaseOrder/PurchaseOrderService.php @@ -11,7 +11,9 @@ namespace App\Services\PurchaseOrder; +use App\Jobs\EDocument\CreateEDocument; use App\Models\PurchaseOrder; +use App\Utils\Ninja; use App\Utils\Traits\MakesHash; class PurchaseOrderService @@ -75,6 +77,32 @@ class PurchaseOrderService return (new GetPurchaseOrderPdf($this->purchase_order, $contact))->run(); } + public function getEPurchaseOrder($contact = null) + { + return (new CreateEDocument($this->purchase_order))->handle(); + } + public function deleteEPurchaseOrder() + { + $this->purchase_order->load('invitations'); + + $this->purchase_order->invitations->each(function ($invitation) { + try { + // if (Storage::disk(config('filesystems.default'))->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + Storage::disk(config('filesystems.default'))->delete($this->purchase_order->client->e_document_filepath($invitation).$this->purchase_order->getFileName("xml")); + // } + + // if (Ninja::isHosted() && Storage::disk('public')->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + if (Ninja::isHosted()) { + Storage::disk('public')->delete($this->purchase_order->client->e_document_filepath($invitation).$this->purchase_order->getFileName("xml")); + } + } catch (\Exception $e) { + nlog($e->getMessage()); + } + }); + + return $this; + } + public function setStatus($status) { $this->purchase_order->status_id = $status; diff --git a/app/Services/Quote/QuoteService.php b/app/Services/Quote/QuoteService.php index ddfebbe00b0d..f2ee47666a67 100644 --- a/app/Services/Quote/QuoteService.php +++ b/app/Services/Quote/QuoteService.php @@ -13,6 +13,7 @@ namespace App\Services\Quote; use App\Events\Quote\QuoteWasApproved; use App\Exceptions\QuoteConversion; +use App\Jobs\EDocument\CreateEDocument; use App\Models\Project; use App\Models\Quote; use App\Repositories\QuoteRepository; @@ -72,6 +73,11 @@ class QuoteService return (new GetQuotePdf($this->quote, $contact))->run(); } + public function getEQuote($contact = null) + { + return (new CreateEDocument($this->quote))->handle(); + } + public function sendEmail($contact = null): self { $send_email = new SendEmail($this->quote, null, $contact); @@ -226,6 +232,27 @@ class QuoteService return $this; } + public function deleteEQuote() + { + $this->quote->load('invitations'); + + $this->quote->invitations->each(function ($invitation) { + try { + // if (Storage::disk(config('filesystems.default'))->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + Storage::disk(config('filesystems.default'))->delete($this->quote->client->e_document_filepath($invitation).$this->quote->getFileName("xml")); + // } + + // if (Ninja::isHosted() && Storage::disk('public')->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + if (Ninja::isHosted()) { + Storage::disk('public')->delete($this->quote->client->e_document_filepath($invitation).$this->quote->getFileName("xml")); + } + } catch (\Exception $e) { + nlog($e->getMessage()); + } + }); + + return $this; + } /** * Saves the quote. From da273d4ed59b7400c97dc06ee0c573473e96dd2d Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 15:27:37 +0100 Subject: [PATCH 22/92] Add E-Document to ZIP-Download --- app/Jobs/PurchaseOrder/ZipPurchaseOrders.php | 5 +++++ app/Jobs/Quote/ZipQuotes.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/app/Jobs/PurchaseOrder/ZipPurchaseOrders.php b/app/Jobs/PurchaseOrder/ZipPurchaseOrders.php index 76a91d6beed3..1fddc7262d0c 100644 --- a/app/Jobs/PurchaseOrder/ZipPurchaseOrders.php +++ b/app/Jobs/PurchaseOrder/ZipPurchaseOrders.php @@ -67,6 +67,11 @@ class ZipPurchaseOrders implements ShouldQueue try { foreach ($invitations as $invitation) { + if ($invitation->purchase_order->client->getSetting('enable_e_invoice')) { + $xml = $invitation->purchase_order->service()->getEInvoice(); + $zipFile->addFromString($invitation->purchase_order->getFileName("xml"), $xml); + } + $file = (new CreateRawPdf($invitation))->handle(); $zipFile->addFromString($invitation->purchase_order->numberFormatter().".pdf", $file); diff --git a/app/Jobs/Quote/ZipQuotes.php b/app/Jobs/Quote/ZipQuotes.php index a39c7615a4ce..fad437718993 100644 --- a/app/Jobs/Quote/ZipQuotes.php +++ b/app/Jobs/Quote/ZipQuotes.php @@ -63,6 +63,10 @@ class ZipQuotes implements ShouldQueue try { foreach ($invitations as $invitation) { + if ($invitation->quote->client->getSetting('enable_e_invoice')) { + $xml = $invitation->quote->service()->getEInvoice(); + $zipFile->addFromString($invitation->quote->getFileName("xml"), $xml); + } $file = (new \App\Jobs\Entity\CreateRawPdf($invitation))->handle(); $zipFile->addFromString($invitation->quote->numberFormatter() . '.pdf', $file); } From 99a211b823fda724da1bbf182423fed5102469bb Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 15:40:25 +0100 Subject: [PATCH 23/92] Added new routes and adapted controllers --- app/Http/Controllers/CreditController.php | 68 ++++++++++++++++++++++ app/Http/Controllers/QuoteController.php | 69 +++++++++++++++++++++++ app/Services/Credit/CreditService.php | 27 +++++++++ routes/client.php | 6 +- 4 files changed, 168 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 3eedd8fe2ffc..e0db0722c133 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -727,6 +727,74 @@ class CreditController extends BaseController }, $credit->numberFormatter() . '.pdf', $headers); } + /** + * @OA\Get( + * path="/api/v1/credit/{invitation_key}/download_e_credit", + * operationId="downloadXcredit", + * tags={"credit"}, + * summary="Download a specific x-credit by invitation key", + * description="Downloads a specific x-credit", + * @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="invitation_key", + * in="path", + * description="The credit Invitation Key", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns the x-credit pdf", + * @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * @param $invitation_key + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse + */ + public function downloadECredit($invitation_key) + { + $invitation = $this->credit_repository->getInvitationByKey($invitation_key); + + if (! $invitation) { + return response()->json(['message' => 'no record found'], 400); + } + + $contact = $invitation->contact; + $credit = $invitation->credit; + + $file = $credit->service()->getEInvoice($contact); + $file_name = $credit->getFileName("xml"); + + $headers = ['Content-Type' => 'application/xml']; + + if (request()->input('inline') == 'true') { + $headers = array_merge($headers, ['Content-Disposition' => 'inline']); + } + + return response()->streamDownload(function () use ($file) { + echo $file; + }, $file_name, $headers); + } + /** * Update the specified resource in storage. diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index 78a5bf625247..1ac67895f009 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -860,6 +860,75 @@ class QuoteController extends BaseController } + /** + * @OA\Get( + * path="/api/v1/invoice/{invitation_key}/download_e_quote", + * operationId="downloadXQuote", + * tags={"quotes"}, + * summary="Download a specific x-quote by invitation key", + * description="Downloads a specific x-quote", + * @OA\Parameter(ref="#/components/parameters/X-API-TOKEN"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="invitation_key", + * in="path", + * description="The Quote Invitation Key", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns the x-quote pdf", + * @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * @param $invitation_key + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse + */ + public function downloadEQuote($invitation_key) + { + $invitation = $this->quote_repo->getInvitationByKey($invitation_key); + + if (! $invitation) { + return response()->json(['message' => 'no record found'], 400); + } + + $contact = $invitation->contact; + $quote = $invitation->quote; + + $file = $quote->service()->getEInvoice($contact); + $file_name = $quote->getFileName("xml"); + + $headers = ['Content-Type' => 'application/xml']; + + if (request()->input('inline') == 'true') { + $headers = array_merge($headers, ['Content-Disposition' => 'inline']); + } + + return response()->streamDownload(function () use ($file) { + echo $file; + }, $file_name, $headers); + } + + /** * Update the specified resource in storage. * diff --git a/app/Services/Credit/CreditService.php b/app/Services/Credit/CreditService.php index deb2f3dffe0b..77409f913e37 100644 --- a/app/Services/Credit/CreditService.php +++ b/app/Services/Credit/CreditService.php @@ -12,6 +12,7 @@ namespace App\Services\Credit; use App\Factory\PaymentFactory; +use App\Jobs\EDocument\CreateEDocument; use App\Models\Credit; use App\Models\Payment; use App\Models\PaymentType; @@ -37,6 +38,11 @@ class CreditService return (new GetCreditPdf($invitation))->run(); } + public function getECredit($contact = null) + { + return (new CreateEDocument($this->credit))->handle(); + } + /** * Applies the invoice number. * @return $this InvoiceService object @@ -232,6 +238,27 @@ class CreditService return $this; } + public function deleteECredit() + { + $this->credit->load('invitations'); + + $this->credit->invitations->each(function ($invitation) { + try { + // if (Storage::disk(config('filesystems.default'))->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + Storage::disk(config('filesystems.default'))->delete($this->credit->client->e_document_filepath($invitation).$this->credit->getFileName("xml")); + // } + + // if (Ninja::isHosted() && Storage::disk('public')->exists($this->invoice->client->e_invoice_filepath($invitation).$this->invoice->getFileName("xml"))) { + if (Ninja::isHosted()) { + Storage::disk('public')->delete($this->credit->client->e_document_filepath($invitation).$this->credit->getFileName("xml")); + } + } catch (\Exception $e) { + nlog($e->getMessage()); + } + }); + + return $this; + } public function triggeredActions($request) { $this->credit = (new TriggeredActions($this->credit, $request))->run(); diff --git a/routes/client.php b/routes/client.php index 0e3fdd729a89..78a7cc50bdbb 100644 --- a/routes/client.php +++ b/routes/client.php @@ -49,7 +49,7 @@ Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db','check_clie Route::get('dashboard', [App\Http\Controllers\ClientPortal\DashboardController::class, 'index'])->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit Route::get('plan', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'plan'])->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit - + Route::get('showBlob/{hash}', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'showBlob'])->name('invoices.showBlob'); Route::get('invoices', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'index'])->name('invoices.index')->middleware('portal_enabled'); Route::post('invoices/payment', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'bulk'])->name('invoices.bulk'); @@ -131,7 +131,9 @@ Route::group(['middleware' => ['invite_db'], 'prefix' => 'client', 'as' => 'clie Route::get('invoice/{invitation_key}/download_pdf', [InvoiceController::class, 'downloadPdf'])->name('invoice.download_invitation_key')->middleware('token_auth'); Route::get('invoice/{invitation_key}/download_e_invoice', [InvoiceController::class, 'downloadEInvoice'])->name('invoice.download_e_invoice')->middleware('token_auth'); Route::get('quote/{invitation_key}/download_pdf', [QuoteController::class, 'downloadPdf'])->name('quote.download_invitation_key')->middleware('token_auth'); + Route::get('quote/{invitation_key}/download_e_quote', [QuoteController::class, "downloadEQuote"])->name()->name('invoice.download_e_quote')->middleware('token_auth'); Route::get('credit/{invitation_key}/download_pdf', [CreditController::class, 'downloadPdf'])->name('credit.download_invitation_key')->middleware('token_auth'); + Route::get('credit/{invitation_key}/download_e_credit', [CreditController::class, 'downloadECredit'])->name('credit.download_invitation_key')->middleware('token_auth'); Route::get('{entity}/{invitation_key}/download', [App\Http\Controllers\ClientPortal\InvitationController::class, 'routerForDownload'])->middleware('token_auth'); Route::get('pay/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'payInvoice'])->name('pay.invoice'); @@ -142,7 +144,7 @@ Route::group(['middleware' => ['invite_db'], 'prefix' => 'client', 'as' => 'clie }); Route::get('route/{hash}', function ($hash) { - + return redirect(decrypt($hash)); }); From bcd6148222fefa12f036c6014f27b2b870520595 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 16:02:15 +0100 Subject: [PATCH 24/92] Adjust Zugferd class to new types --- app/Jobs/EDocument/CreateEDocument.php | 28 ++-- .../EDocument/Standards/ZugferdEDokument.php | 137 ++++++++++-------- 2 files changed, 98 insertions(+), 67 deletions(-) diff --git a/app/Jobs/EDocument/CreateEDocument.php b/app/Jobs/EDocument/CreateEDocument.php index 07e967c0b399..a30246559979 100644 --- a/app/Jobs/EDocument/CreateEDocument.php +++ b/app/Jobs/EDocument/CreateEDocument.php @@ -11,6 +11,7 @@ namespace App\Jobs\EDocument; +use App\Models\Credit; use App\Models\Invoice; use App\Models\PurchaseOrder; use App\Models\Quote; @@ -70,16 +71,16 @@ class CreateEDocument implements ShouldQueue case "XInvoice-Extended": case "XInvoice-BasicWL": case "XInvoice-Basic": - $zugferd = (new ZugferdEDokument($this->invoice))->run(); + $zugferd = (new ZugferdEDokument($this->document))->run(); - return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + return $this->returnObject ? $zugferd->xdocument : $zugferd->getXml(); case "Facturae_3.2": case "Facturae_3.2.1": case "Facturae_3.2.2": - return (new FacturaEInvoice($this->invoice, str_replace("Facturae_", "", $e_invoice_type)))->run(); + return (new FacturaEInvoice($this->document, str_replace("Facturae_", "", $e_document_type)))->run(); default: - $zugferd = (new ZugferdEDokument($this->invoice))->run(); + $zugferd = (new ZugferdEDokument($this->document))->run(); return $this->returnObject ? $zugferd : $zugferd->getXml(); @@ -97,15 +98,22 @@ class CreateEDocument implements ShouldQueue case "XInvoice-Extended": case "XInvoice-BasicWL": case "XInvoice-Basic": - $zugferd = (new ZugferdEDokument($this->invoice))->run(); - return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + $zugferd = (new ZugferdEDokument($this->document))->run(); + return $this->returnObject ? $zugferd->xdocument : $zugferd->getXml(); default: - $zugferd = (new ZugferdEDokument($this->invoice))->run(); + $zugferd = (new ZugferdEDokument($this->document))->run(); return $this->returnObject ? $zugferd : $zugferd->getXml(); } } elseif ($this->document instanceof PurchaseOrder){ switch ($e_document_type){ + // No supported implementation yet. + default: + return ""; + } + } + elseif ($this->document instanceof Credit) { + switch ($e_document_type) { case "EN16931": case "XInvoice_3_0": case "XInvoice_2_3": @@ -116,10 +124,10 @@ class CreateEDocument implements ShouldQueue case "XInvoice-Extended": case "XInvoice-BasicWL": case "XInvoice-Basic": - $zugferd = (new ZugferdEDokument($this->invoice))->run(); - return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); + $zugferd = (new ZugferdEDokument($this->document))->run(); + return $this->returnObject ? $zugferd->xdocument : $zugferd->getXml(); default: - $zugferd = (new ZugferdEDokument($this->invoice))->run(); + $zugferd = (new ZugferdEDokument($this->document))->run(); return $this->returnObject ? $zugferd : $zugferd->getXml(); } } diff --git a/app/Services/EDocument/Standards/ZugferdEDokument.php b/app/Services/EDocument/Standards/ZugferdEDokument.php index ce295c74d3e7..0d415e73d7c3 100644 --- a/app/Services/EDocument/Standards/ZugferdEDokument.php +++ b/app/Services/EDocument/Standards/ZugferdEDokument.php @@ -11,8 +11,11 @@ namespace App\Services\EInvoicing\Standards; +use App\Models\Credit; use App\Models\Invoice; use App\Models\Product; +use App\Models\PurchaseOrder; +use App\Models\Quote; use App\Services\AbstractService; use horstoeko\zugferd\codelists\ZugferdDutyTaxFeeCategories; use horstoeko\zugferd\ZugferdDocumentBuilder; @@ -20,17 +23,17 @@ use horstoeko\zugferd\ZugferdProfiles; class ZugferdEDokument extends AbstractService { - public ZugferdDocumentBuilder $xrechnung; + public ZugferdDocumentBuilder $xdocument; - public function __construct(public Invoice $invoice, private readonly bool $returnObject = false, private array $tax_map = []) + public function __construct(public object $document, private readonly bool $returnObject = false, private array $tax_map = []) { } public function run(): self { - $company = $this->invoice->company; - $client = $this->invoice->client; + $company = $this->document->company; + $client = $this->document->client; $profile = $client->getSetting('e_invoice_type'); $profile = match ($profile) { @@ -46,123 +49,143 @@ class ZugferdEDokument extends AbstractService default => ZugferdProfiles::PROFILE_EN16931, }; - $this->xrechnung = ZugferdDocumentBuilder::CreateNew($profile); + $this->xdocument = ZugferdDocumentBuilder::CreateNew($profile); - $this->xrechnung - ->setDocumentSupplyChainEvent(date_create($this->invoice->date ?? now()->format('Y-m-d'))) + $this->xdocument + ->setDocumentSupplyChainEvent(date_create($this->document->date ?? now()->format('Y-m-d'))) ->setDocumentSeller($company->getSetting('name')) ->setDocumentSellerAddress($company->getSetting("address1"), $company->getSetting("address2"), "", $company->getSetting("postal_code"), $company->getSetting("city"), $company->country()->iso_3166_2, $company->getSetting("state")) - ->setDocumentSellerContact($this->invoice->user->present()->getFullName(), "", $this->invoice->user->present()->phone(), "", $this->invoice->user->email) + ->setDocumentSellerContact($this->document->user->present()->getFullName(), "", $this->document->user->present()->phone(), "", $this->document->user->email) ->setDocumentBuyer($client->present()->name(), $client->number) ->setDocumentBuyerAddress($client->address1, "", "", $client->postal_code, $client->city, $client->country->iso_3166_2, $client->state) ->setDocumentBuyerContact($client->present()->primary_contact_name(), "", $client->present()->phone(), "", $client->present()->email()) - ->addDocumentPaymentTerm(ctrans("texts.xinvoice_payable", ['payeddue' => date_create($this->invoice->date ?? now()->format('Y-m-d'))->diff(date_create($this->invoice->due_date ?? now()->format('Y-m-d')))->format("%d"), 'paydate' => $this->invoice->due_date])); + ->addDocumentPaymentTerm(ctrans("texts.xinvoice_payable", ['payeddue' => date_create($this->document->date ?? now()->format('Y-m-d'))->diff(date_create($this->document->due_date ?? now()->format('Y-m-d')))->format("%d"), 'paydate' => $this->document->due_date])); - if (!empty($this->invoice->public_notes)) { - $this->xrechnung->addDocumentNote($this->invoice->public_notes ?? ''); + if (!empty($this->document->public_notes)) { + $this->xdocument->addDocumentNote($this->document->public_notes ?? ''); } - if (empty($this->invoice->number)) { - $this->xrechnung->setDocumentInformation("DRAFT", "380", date_create($this->invoice->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); - } else { - $this->xrechnung->setDocumentInformation($this->invoice->number, "380", date_create($this->invoice->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + // Document type + $document_class = get_class($this->document); + switch ($document_class){ + case Quote::class: + // Probably wrong file code https://github.com/horstoeko/zugferd/blob/master/src/codelists/ZugferdInvoiceType.php + if (empty($this->document->number)) { + $this->xdocument->setDocumentInformation("DRAFT", "84", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + } else { + $this->xdocument->setDocumentInformation($this->document->number, "84", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + }; + break; + case Invoice::class: + if (empty($this->document->number)) { + $this->xdocument->setDocumentInformation("DRAFT", "380", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + } else { + $this->xdocument->setDocumentInformation($this->document->number, "380", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + } + break; + case Credit::class: + if (empty($this->document->number)) { + $this->xdocument->setDocumentInformation("DRAFT", "389", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + } else { + $this->xdocument->setDocumentInformation($this->document->number, "389", date_create($this->document->date ?? now()->format('Y-m-d')), $client->getCurrencyCode()); + } } - if (isset($this->invoice->po_number)) { - $this->xrechnung->setDocumentBuyerOrderReferencedDocument($this->invoice->po_number); + if (isset($this->document->po_number)) { + $this->xdocument->setDocumentBuyerOrderReferencedDocument($this->document->po_number); } if (empty($client->routing_id)) { - $this->xrechnung->setDocumentBuyerReference(ctrans("texts.xinvoice_no_buyers_reference")); + $this->xdocument->setDocumentBuyerReference(ctrans("texts.xinvoice_no_buyers_reference")); } else { - $this->xrechnung->setDocumentBuyerReference($client->routing_id); + $this->xdocument->setDocumentBuyerReference($client->routing_id); } if (isset($client->shipping_address1) && $client->shipping_country) { - $this->xrechnung->setDocumentShipToAddress($client->shipping_address1, $client->shipping_address2, "", $client->shipping_postal_code, $client->shipping_city, $client->shipping_country->iso_3166_2, $client->shipping_state); + $this->xdocument->setDocumentShipToAddress($client->shipping_address1, $client->shipping_address2, "", $client->shipping_postal_code, $client->shipping_city, $client->shipping_country->iso_3166_2, $client->shipping_state); } - $this->xrechnung->addDocumentPaymentMean(68, ctrans("texts.xinvoice_online_payment")); + $this->xdocument->addDocumentPaymentMean(68, ctrans("texts.xinvoice_online_payment")); if (str_contains($company->getSetting('vat_number'), "/")) { - $this->xrechnung->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number')); + $this->xdocument->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number')); } else { - $this->xrechnung->addDocumentSellerTaxRegistration("VA", $company->getSetting('vat_number')); + $this->xdocument->addDocumentSellerTaxRegistration("VA", $company->getSetting('vat_number')); } - $invoicing_data = $this->invoice->calc(); + $invoicing_data = $this->document->calc(); //Create line items and calculate taxes - foreach ($this->invoice->line_items as $index => $item) { + foreach ($this->document->line_items as $index => $item) { /** @var \App\DataMapper\InvoiceItem $item **/ - $this->xrechnung->addNewPosition($index) + $this->xdocument->addNewPosition($index) ->setDocumentPositionGrossPrice($item->gross_line_total) ->setDocumentPositionNetPrice($item->line_total); if (!empty($item->product_key)) { if (!empty($item->notes)) { - $this->xrechnung->setDocumentPositionProductDetails($item->product_key, $item->notes); + $this->xdocument->setDocumentPositionProductDetails($item->product_key, $item->notes); } else { - $this->xrechnung->setDocumentPositionProductDetails($item->product_key); + $this->xdocument->setDocumentPositionProductDetails($item->product_key); } } else { if (!empty($item->notes)) { - $this->xrechnung->setDocumentPositionProductDetails($item->notes); + $this->xdocument->setDocumentPositionProductDetails($item->notes); } else { - $this->xrechnung->setDocumentPositionProductDetails("no product name defined"); + $this->xdocument->setDocumentPositionProductDetails("no product name defined"); } } if (isset($item->task_id)) { - $this->xrechnung->setDocumentPositionQuantity($item->quantity, "HUR"); + $this->xdocument->setDocumentPositionQuantity($item->quantity, "HUR"); } else { - $this->xrechnung->setDocumentPositionQuantity($item->quantity, "H87"); + $this->xdocument->setDocumentPositionQuantity($item->quantity, "H87"); } $linenetamount = $item->line_total; if ($item->discount > 0) { - if ($this->invoice->is_amount_discount) { + if ($this->document->is_amount_discount) { $linenetamount -= $item->discount; } else { $linenetamount -= $linenetamount * ($item->discount / 100); } } - $this->xrechnung->setDocumentPositionLineSummation($linenetamount); + $this->xdocument->setDocumentPositionLineSummation($linenetamount); // According to european law, each line item can only have one tax rate if (!(empty($item->tax_name1) && empty($item->tax_name2) && empty($item->tax_name3))) { $taxtype = $this->getTaxType($item->tax_id); if (!empty($item->tax_name1)) { - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate1); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate1); $this->addtoTaxMap($taxtype, $linenetamount, $item->tax_rate1); } elseif (!empty($item->tax_name2)) { - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate2); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate2); $this->addtoTaxMap($taxtype, $linenetamount, $item->tax_rate2); } elseif (!empty($item->tax_name3)) { - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate3); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $item->tax_rate3); $this->addtoTaxMap($taxtype, $linenetamount, $item->tax_rate3); } else { // nlog("Can't add correct tax position"); } } else { - if (!empty($this->invoice->tax_name1)) { - $taxtype = $this->getTaxType($this->invoice->tax_name1); - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $this->invoice->tax_rate1); - $this->addtoTaxMap($taxtype, $linenetamount, $this->invoice->tax_rate1); - } elseif (!empty($this->invoice->tax_name2)) { - $taxtype = $this->getTaxType($this->invoice->tax_name2); - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $this->invoice->tax_rate2); - $this->addtoTaxMap($taxtype, $linenetamount, $this->invoice->tax_rate2); - } elseif (!empty($this->invoice->tax_name3)) { - $taxtype = $this->getTaxType($this->invoice->tax_name3); - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', $this->invoice->tax_rate3); - $this->addtoTaxMap($taxtype, $linenetamount, $this->invoice->tax_rate3); + if (!empty($this->document->tax_name1)) { + $taxtype = $this->getTaxType($this->document->tax_name1); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $this->document->tax_rate1); + $this->addtoTaxMap($taxtype, $linenetamount, $this->document->tax_rate1); + } elseif (!empty($this->document->tax_name2)) { + $taxtype = $this->getTaxType($this->document->tax_name2); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $this->document->tax_rate2); + $this->addtoTaxMap($taxtype, $linenetamount, $this->document->tax_rate2); + } elseif (!empty($this->document->tax_name3)) { + $taxtype = $this->getTaxType($this->document->tax_name3); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', $this->document->tax_rate3); + $this->addtoTaxMap($taxtype, $linenetamount, $this->document->tax_rate3); } else { $taxtype = ZugferdDutyTaxFeeCategories::ZERO_RATED_GOODS; - $this->xrechnung->addDocumentPositionTax($taxtype, 'VAT', 0); + $this->xdocument->addDocumentPositionTax($taxtype, 'VAT', 0); $this->addtoTaxMap($taxtype, $linenetamount, 0); // nlog("Can't add correct tax position"); } } } - $this->xrechnung->setDocumentSummation($this->invoice->amount, $this->invoice->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), 0.0, $this->invoice->amount - $this->invoice->balance); + $this->xdocument->setDocumentSummation($this->document->amount, $this->document->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), 0.0, $this->document->amount - $this->document->balance); foreach ($this->tax_map as $item) { - $this->xrechnung->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100); + $this->xdocument->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100); } // The validity can be checked using https://portal3.gefeg.com/invoice/validation or https://e-rechnung.bayern.de/app/#/upload @@ -178,7 +201,7 @@ class ZugferdEDokument extends AbstractService */ public function getXml(): string { - return $this->xrechnung->getContent(); + return $this->xdocument->getContent(); } private function getTaxType($name): string @@ -204,13 +227,13 @@ class ZugferdEDokument extends AbstractService } $eu_states = ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "EL", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "IS", "LI", "NO", "CH"]; if (empty($tax_type)) { - if ((in_array($this->invoice->company->country()->iso_3166_2, $eu_states) && in_array($this->invoice->client->country->iso_3166_2, $eu_states)) && $this->invoice->company->country()->iso_3166_2 != $this->invoice->client->country->iso_3166_2) { + if ((in_array($this->document->company->country()->iso_3166_2, $eu_states) && in_array($this->document->client->country->iso_3166_2, $eu_states)) && $this->document->company->country()->iso_3166_2 != $this->document->client->country->iso_3166_2) { $tax_type = ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES; - } elseif (!in_array($this->invoice->client->country->iso_3166_2, $eu_states)) { + } elseif (!in_array($this->document->client->country->iso_3166_2, $eu_states)) { $tax_type = ZugferdDutyTaxFeeCategories::SERVICE_OUTSIDE_SCOPE_OF_TAX; - } elseif ($this->invoice->client->country->iso_3166_2 == "ES-CN") { + } elseif ($this->document->client->country->iso_3166_2 == "ES-CN") { $tax_type = ZugferdDutyTaxFeeCategories::CANARY_ISLANDS_GENERAL_INDIRECT_TAX; - } elseif (in_array($this->invoice->client->country->iso_3166_2, ["ES-CE", "ES-ML"])) { + } elseif (in_array($this->document->client->country->iso_3166_2, ["ES-CE", "ES-ML"])) { $tax_type = ZugferdDutyTaxFeeCategories::TAX_FOR_PRODUCTION_SERVICES_AND_IMPORTATION_IN_CEUTA_AND_MELILLA; } else { nlog("Unkown tax case for xinvoice"); From cd0884c77085ef97e10c63c05c36dc17b6495f1a Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Sun, 10 Mar 2024 16:24:28 +0100 Subject: [PATCH 25/92] Added download button in client portal for new types --- .../components/livewire/pdf-slot.blade.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php index 5159e3314c1e..314f69cca8ee 100644 --- a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php @@ -20,6 +20,40 @@ @endif + @if($entity_type == 'credit' && $settings->enable_e_invoice) + + @endif + @if($entity_type == 'quote' && $settings->enable_e_invoice) + + @endif +{{-- Not implemented yet--}} +{{-- @if($entity_type == 'purchase_order' && $settings->enable_e_invoice) + + @endif--}} @if($html_entity_option)