companies

Sets the company as the default company.

Changed on

Sets the company as the default company.

post/api/v1/companies/{company}/default

Request

Path parameters

companystring string required

The Company Hashed ID

Query parameters

includestring
Example:first_load

Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Response

Returns the company object

idstring

The unique hashed identifier for the company

size_idstring

The unique identifier representing the company's size category

industry_idstring

The unique identifier representing the company's industry category

slack_webhook_urlstring

The URL for the company's Slack webhook notifications

google_analytics_keystring

The company's Google Analytics tracking ID

portal_modestring

The mode determining how client-facing URLs are structured (e.g., subdomain, domain, or iframe)

subdomainstring

The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)

portal_domainstring

The fully qualified domain used for client-facing URLs

enabled_tax_ratesinteger

The number of tax rates used per entity

fill_productsboolean

A flag determining whether to auto-fill product descriptions based on the product key

convert_productsboolean

A flag determining whether to convert products between different types or units

update_productsboolean

A flag determining whether to update product descriptions when the description changes

show_product_detailsboolean

A flag determining whether to display product details in the user interface

show_product_costboolean

A flag determining whether to display product cost is shown in the user interface

custom_fieldsobject

A mapping of custom fields for various objects within the company

note The custom fields object is formatted as follows

key : value entity(integer) : label|type

for example: "company1": "Number|single_line_text",

This defines the first company custom field, with label Number which has a custom field type of a single text line

Supported entity types

invoice product client contact task user project vendor expense payment

Supported input types values

single_line_text date switch

For text areas, you only need to supply the label ie "TextArea", the | and type values are not required. For the dropdown the data format is as follows:

label|your,drop,down,values,in,comma,separated,format

enable_product_costboolean

A flag determining whether to show or hide the product cost field in the user interface

enable_product_quantityboolean

A flag determining whether to show or hide the product quantity field in the user interface

default_quantityboolean

A flag determining whether to use a default quantity for products

custom_surcharge_taxes1boolean

A flag determining whether to apply taxes on custom surcharge amounts for the first custom surcharge field

custom_surcharge_taxes2boolean

A flag determining whether to apply taxes on custom surcharge amounts for the second custom surcharge field

custom_surcharge_taxes3boolean

A flag determining whether to apply taxes on custom surcharge amounts for the third custom surcharge field

custom_surcharge_taxes4unknown
logostring binary

The company logo file in binary format

company_keystring

The static company key hash used to identify the Company

client_can_registerboolean

A flag determining whether clients can register for the client portal

enabled_modulesinteger

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.

dbstring
first_day_of_weekstring

The first day of the week for the company

first_month_of_yearstring

The first month for the company financial year

enabled_item_tax_ratesinteger

The number of tax rates used per item

is_largeboolean

A flag determining whether the company is considered large

default_auto_billstring

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_invoiceableboolean

A flag determining whether to mark expenses as invoiceable by default

mark_expenses_paidboolean

A flag determining whether to mark expenses as paid by default

invoice_expense_documentsboolean

A flag determining whether to include expense documents on invoices by default

auto_start_tasksboolean

A flag determining whether to auto-start tasks by default

invoice_task_timelogboolean

A flag determining whether to include task time logs on invoices by default

invoice_task_documentsboolean

A flag determining whether to include task documents on invoices by default

show_tasks_tableboolean

A flag determining whether to show the tasks table on invoices by default

is_disabledboolean

A flag determining whether the company is disabled

default_task_is_date_basedboolean

A flag determining whether to default tasks to be date-based

enable_product_discountboolean

A flag determining whether to show or hide the product discount field in the user interface

calculate_expense_tax_by_amountboolean

A flag determining whether to calculate expense taxes by amount

expense_inclusive_taxesboolean

A flag determining whether to include taxes in the expense amount

session_timeoutinteger

The session timeout for the company

oauth_password_requiredboolean

A flag determining whether to require a password for dangerous actions when using OAuth

invoice_task_datelogboolean

A flag determining whether to include task date logs on invoices by default

default_password_timeoutinteger

The default password timeout for the company

show_task_end_dateboolean

A flag determining whether to show the task end date on invoices by default

markdown_enabledboolean

A flag determining whether markdown is enabled for the company

report_include_draftsboolean

A flag determining whether to include draft invoices in reports

client_registration_fieldsobject

The client registration fields for the company

stop_on_unpaid_recurringboolean

A flag determining whether to stop recurring invoices when they are unpaid

use_quote_terms_on_conversionboolean

A flag determining whether to use quote terms on conversion to an invoice

enable_applying_paymentsboolean

A flag determining whether to enable applying payments to invoices

track_inventoryboolean

A flag determining whether to track inventory for the company

inventory_notification_thresholdinteger

The inventory notification threshold for the company

stock_notificationboolean

A flag determining whether to send stock notifications for the company

matomo_urlstring

The Matomo URL for the company

matomo_idstring

The Matomo ID for the company

enabled_expense_tax_ratesinteger

The number of tax rates used per expense

invoice_task_projectboolean

A flag determining whether to include the project on invoices by default

report_include_deletedboolean

A flag determining whether to include deleted invoices in reports

invoice_task_lockboolean

A flag determining whether to lock tasks when invoiced

convert_payment_currencyboolean

A flag determining whether to convert the payment currency

convert_expense_currencyboolean

A flag determining whether to convert the expense currency

notify_vendor_when_paidboolean

A flag determining whether to notify the vendor when an expense is paid

invoice_task_hoursboolean

A flag determining whether to include the task hours on invoices by default

calculate_taxesboolean

A flag determining whether to calculate taxes for the company

tax_dataobject

The tax data for the company

e_invoice_certificatestring

The e-invoice certificate for the company

e_invoice_certificate_passphrasestring

The e-invoice certificate passphrase for the company

origin_tax_dataobject

The origin tax data for the company

invoice_task_project_headerboolean

A flag determining whether to include the project header on invoices by default

invoice_task_item_descriptionboolean

A flag determining whether to include the item description on invoices by default

expense_mailboxstring

The email address for the expense mailbox

expense_mailbox_activeboolean

Whether the expense mailbox is active

inbound_mailbox_allow_company_usersboolean

Whether company users are allowed to use the inbound mailbox

inbound_mailbox_allow_vendorsboolean

Whether vendors are allowed to use the inbound mailbox

inbound_mailbox_allow_clientsboolean

Whether clients are allowed to use the inbound mailbox

inbound_mailbox_allow_unknownboolean

Whether unknown senders are allowed to use the inbound mailbox

inbound_mailbox_whiteliststring

Comma-separated list of whitelisted email addresses for the inbound mailbox

inbound_mailbox_blackliststring

Comma-separated list of blacklisted email addresses for the inbound mailbox

smtp_hoststring

The SMTP host for sending emails

smtp_portinteger

The SMTP port for sending emails

smtp_encryption'tls' | 'ssl' nullable

The encryption method for SMTP

smtp_local_domainstring

The local domain for SMTP

smtp_verify_peerboolean

Whether to verify the SMTP peer

e_invoiceobject

E-invoice settings for the company

legal_entity_idinteger

The ID of the legal entity associated with the company

convert_rate_to_clientboolean

Flag indicating whether to convert rates to the client currency

e_invoicing_tokenstring

Authentication token for e-invoicing services

enable_shop_apiboolean

Flag indicating whether the shop API is enabled

markdown_email_enabledboolean

Flag indicating whether markdown formatting is enabled in emails

use_comma_as_decimal_placeboolean

Flag indicating whether to use comma as decimal separator instead of period

Example response

{
  "id": "WJxbojagwO",
  "size_id": "2",
  "industry_id": "5",
  "slack_webhook_url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
  "google_analytics_key": "UA-123456789-1",
  "portal_mode": "subdomain",
  "subdomain": "acme",
  "portal_domain": "https://subdomain.invoicing.co",
  "enabled_tax_rates": 2,
  "fill_products": true,
  "convert_products": true,
  "update_products": true,
  "show_product_details": true,
  "show_product_cost": true,
  "enable_product_cost": true,
  "enable_product_quantity": true,
  "default_quantity": true,
  "custom_surcharge_taxes1": true,
  "custom_surcharge_taxes2": true,
  "custom_surcharge_taxes3": true,
  "logo": "logo.png",
  "company_key": "Vnb14bRlwiFjc5ckte6cfbygTRkn5IMQ",
  "client_can_register": true,
  "enabled_modules": 2048,
  "db": "db-ninja-01",
  "first_day_of_week": "1",
  "first_month_of_year": "1",
  "enabled_item_tax_rates": 2,
  "is_large": true,
  "default_auto_bill": "always",
  "mark_expenses_invoiceable": true,
  "mark_expenses_paid": true,
  "invoice_expense_documents": true,
  "auto_start_tasks": true,
  "invoice_task_timelog": true,
  "invoice_task_documents": true,
  "show_tasks_table": true,
  "is_disabled": true,
  "default_task_is_date_based": true,
  "enable_product_discount": true,
  "calculate_expense_tax_by_amount": true,
  "expense_inclusive_taxes": true,
  "session_timeout": 60,
  "oauth_password_required": true,
  "invoice_task_datelog": true,
  "default_password_timeout": 60,
  "show_task_end_date": true,
  "markdown_enabled": true,
  "report_include_drafts": true,
  "stop_on_unpaid_recurring": true,
  "use_quote_terms_on_conversion": true,
  "enable_applying_payments": true,
  "track_inventory": true,
  "inventory_notification_threshold": 60,
  "stock_notification": true,
  "matomo_url": "https://matomo.example.com",
  "matomo_id": "1",
  "enabled_expense_tax_rates": 2,
  "invoice_task_project": true,
  "report_include_deleted": true,
  "invoice_task_lock": true,
  "convert_payment_currency": true,
  "convert_expense_currency": true,
  "notify_vendor_when_paid": true,
  "invoice_task_hours": true,
  "calculate_taxes": true,
  "e_invoice_certificate": "-----BEGIN CERTIFICATE-----",
  "e_invoice_certificate_passphrase": "secret",
  "invoice_task_project_header": true,
  "invoice_task_item_description": true,
  "expense_mailbox": "expenses@company.com",
  "expense_mailbox_active": true,
  "inbound_mailbox_allow_company_users": true,
  "inbound_mailbox_allow_clients": true,
  "inbound_mailbox_whitelist": "user1@example.com,user2@example.com",
  "inbound_mailbox_blacklist": "spam@example.com,unwanted@example.com",
  "smtp_host": "smtp.gmail.com",
  "smtp_port": 587,
  "smtp_encryption": "tls",
  "smtp_local_domain": "company.com",
  "smtp_verify_peer": true,
  "legal_entity_id": 1234,
  "convert_rate_to_client": true,
  "e_invoicing_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
  "enable_shop_api": true,
  "markdown_email_enabled": true,
  "use_comma_as_decimal_place": true,
  "settings": {
    "currency_id": "1",
    "timezone_id": "15",
    "date_format_id": "15",
    "military_time": true,
    "language_id": "1",
    "show_currency_code": true,
    "payment_terms": 1,
    "company_gateway_ids": "1,2,3,4",
    "custom_value1": "Custom Label",
    "custom_value2": "Custom Label",
    "custom_value3": "Custom Label",
    "custom_value4": "Custom Label",
    "default_task_rate": 10,
    "send_reminders": true,
    "enable_client_portal_tasks": true,
    "email_style": "light",
    "reply_to_email": "email@gmail.com",
    "bcc_email": "email@gmail.com, contact@gmail.com",
    "pdf_email_attachment": true,
    "ubl_email_attachment": true,
    "email_style_custom": "<HTML></HTML>",
    "counter_number_applied": "when_sent",
    "quote_number_applied": "when_sent",
    "custom_message_dashboard": "Please pay invoices immediately",
    "custom_message_unpaid_invoice": "Please pay invoices immediately",
    "custom_message_paid_invoice": "Thanks for paying this invoice!",
    "custom_message_unapproved_quote": "Please approve quote",
    "lock_invoices": "off",
    "auto_archive_invoice": true,
    "auto_archive_quote": true,
    "auto_convert_quote": true,
    "inclusive_taxes": true,
    "translations": {},
    "task_number_pattern": "{$year}-{$counter}",
    "task_number_counter": 1,
    "reminder_send_time": 32400,
    "expense_number_pattern": "{$year}-{$counter}",
    "expense_number_counter": 1,
    "vendor_number_pattern": "{$year}-{$counter}",
    "vendor_number_counter": 1,
    "ticket_number_pattern": "{$year}-{$counter}",
    "ticket_number_counter": 1,
    "payment_number_pattern": "{$year}-{$counter}",
    "payment_number_counter": 1,
    "invoice_number_pattern": "{$year}-{$counter}",
    "invoice_number_counter": 1,
    "quote_number_pattern": "{$year}-{$counter}",
    "quote_number_counter": 1,
    "client_number_pattern": "{$year}-{$counter}",
    "client_number_counter": 1,
    "credit_number_pattern": "{$year}-{$counter}",
    "credit_number_counter": 1,
    "recurring_invoice_number_prefix": "R",
    "reset_counter_frequency_id": 1,
    "reset_counter_date": "2019-01-01",
    "counter_padding": 1,
    "shared_invoice_quote_counter": true,
    "update_products": true,
    "convert_products": true,
    "fill_products": true,
    "invoice_terms": "Invoice Terms are...",
    "quote_terms": "Quote Terms are...",
    "invoice_taxes": 1,
    "invoice_design_id": "1",
    "quote_design_id": "1",
    "invoice_footer": "1",
    "invoice_labels": "1",
    "tax_rate1": 10,
    "tax_name1": "GST",
    "tax_rate2": 10,
    "tax_name2": "GST",
    "tax_rate3": 10,
    "tax_name3": "GST",
    "payment_type_id": "1",
    "custom_fields": "{}",
    "email_footer": "A default email footer",
    "email_sending_method": "default",
    "gmail_sending_user_id": "F76sd34D",
    "email_subject_invoice": "Your Invoice Subject",
    "email_subject_quote": "Your Quote Subject",
    "email_subject_payment": "Your Payment Subject",
    "email_template_invoice": "<HTML></HTML>",
    "email_template_quote": "<HTML></HTML>",
    "email_template_payment": "<HTML></HTML>",
    "email_subject_reminder1": "<HTML></HTML>",
    "email_subject_reminder2": "<HTML></HTML>",
    "email_subject_reminder3": "<HTML></HTML>",
    "email_subject_reminder_endless": "<HTML></HTML>",
    "email_template_reminder1": "<HTML></HTML>",
    "email_template_reminder2": "<HTML></HTML>",
    "email_template_reminder3": "<HTML></HTML>",
    "email_template_reminder_endless": "<HTML></HTML>",
    "enable_portal_password": true,
    "show_accept_invoice_terms": true,
    "show_accept_quote_terms": true,
    "require_invoice_signature": true,
    "require_quote_signature": true,
    "name": "Acme Co",
    "company_logo": "logo.png",
    "website": "https://www.acme.com",
    "address1": "Suite 888",
    "address2": "5 Jimbo Way",
    "city": "Sydney",
    "state": "Florida",
    "postal_code": "90210",
    "phone": "555-213-3948",
    "email": "joe@acme.co",
    "country_id": "1",
    "vat_number": "32 120 377 720",
    "page_size": "A4",
    "font_size": 9,
    "primary_font": "roboto",
    "secondary_font": "roboto",
    "email_template_statement": "template matter",
    "email_subject_statement": "subject matter",
    "quote_footer": "the quote footer",
    "email_subject_custom1": "Custom Subject 1",
    "email_subject_custom2": "Custom Subject 2",
    "email_subject_custom3": "Custom Subject 3",
    "email_template_custom1": "<HTML></HTML>",
    "email_template_custom2": "<HTML></HTML>",
    "email_template_custom3": "<HTML></HTML>",
    "num_days_reminder1": 9,
    "num_days_reminder2": 9,
    "num_days_reminder3": 9,
    "schedule_reminder1": "after_invoice_date",
    "schedule_reminder2": "after_invoice_date",
    "schedule_reminder3": "after_invoice_date",
    "late_fee_amount1": 10,
    "late_fee_amount2": 20,
    "late_fee_amount3": 100,
    "endless_reminder_frequency_id": "1",
    "default_expense_payment_type_id": "0",
    "e_invoice_type": "EN16931",
    "mailgun_endpoint": "api.mailgun.net",
    "client_initiated_payments_minimum": 10,
    "custom_sending_email": "bob@gmail.com",
    "company_logo_size": 100,
    "email_alignment": "left",
    "postmark_secret": "123456",
    "mailgun_secret": "123456",
    "mailgun_domain": "sandbox123456.mailgun.org",
    "besr_id": "123456",
    "qr_iban": "CH123456",
    "email_subject_purchase_order": "Purchase Order",
    "email_template_purchase_order": "Please see attached your purchase order.",
    "purchase_order_public_notes": "Please see attached your purchase order.",
    "purchase_order_terms": "Please see attached your purchase order.",
    "purchase_order_footer": "Please see attached your purchase order.",
    "purchase_order_design_id": "hd677df",
    "purchase_order_number_pattern": "PO-000000",
    "purchase_order_number_counter": 1,
    "page_numbering_alignment": "left",
    "email_from_name": "Bob Smith",
    "show_all_tasks_client_portal": "all",
    "entity_send_time": 9,
    "reply_to_name": "Bob Smith",
    "recurring_invoice_number_pattern": "R-000000",
    "recurring_invoice_number_counter": 1,
    "client_portal_under_payment_minimum": 10,
    "auto_bill_date": "on_send_date",
    "primary_color": "#ffffff",
    "secondary_color": "#ffffff",
    "auto_bill": "off",
    "client_portal_terms": "Please see attached your invoice.",
    "client_portal_privacy_policy": "These are the terms of use for using the client portal.",
    "portal_design_id": "hd677df",
    "late_fee_endless_percent": 10,
    "late_fee_endless_amount": 10,
    "email_signature": "Bob Smith",
    "classification": "individual",
    "valid_until": "30 days",
    "credit_terms": "Credit note terms",
    "credit_footer": "Credit note footer"
  }
}

Changes

    • info

      the response optional property became read-only for the status

    • breaking

      the response property became nullable for the status

    • info

      removed the undefined enum value from the response property for the response status