Download OpenAPI specification:

Welcome to the Invoice Ninja API documentation, your comprehensive guide to integrating Invoice Ninja's powerful features into your applications. Whether you're building a custom client, automating workflows, or integrating with other systems, our API provides the tools you need to streamline your invoicing and billing processes.
Invoice Ninja is a robust source-available platform designed to simplify invoicing, billing, and payment management for freelancers, small businesses, and enterprises alike. With a user-friendly interface, customizable templates, and a suite of powerful features, Invoice Ninja empowers businesses to create professional invoices, track expenses, manage clients, and get paid faster.
PHP SDK can be found here Go SDK can be found here
The Invoice Ninja API allows developers to extend the functionality of Invoice Ninja by programmatically accessing and manipulating data within their Invoice Ninja accounts. With the API, you can automate repetitive tasks, integrate with third-party services, and build custom solutions tailored to your specific business needs.
To get started with the Invoice Ninja API, you'll need an active Invoice Ninja account (or your own self hosted installation) and API credentials. If you haven't already done so, sign up for an account at Invoice Ninja and generate your API keys from the settings section.
Once you have your API credentials, you can start exploring the API endpoints, authentication methods, request and response formats, and more using the documentation provided here.
This documentation is organized into sections to help you navigate and understand the various aspects of the Invoice Ninja API:
If you have any questions, encounter any issues, or need assistance with using the Invoice Ninja API, don't hesitate to reach out to our support team or join our community forums. We're here to help you succeed with Invoice Ninja and make the most of our API.
Let's start building together!
Production: https://invoicing.co
Demo: https://demo.invoiceninja.com
PHP SDK can be found here Go SDK can be found here
Invoice Ninja uses API tokens to authenticate requests. You can view and manage your API keys in Settings > Account Management > Integrations > API tokens
API requests must be made over HTTPS. Calls made to HTTP will fail.
Invoice Ninja uses standard HTTP response codes to indicate the success or failure of a request. below is a table of standard status codes and responses
| Status Code | Explanation |
|---|---|
| 200 | OK: The request has succeeded. The information returned with the response is dependent on the method used in the request. |
| 301 | Moved Permanently: This and all future requests should be directed to the given URI. |
| 303 | See Other: The response to the request can be found under another URI using the GET method. |
| 400 | Bad Request: The server cannot or will not process the request due to an apparent client error. |
| 401 | Unauthorized: Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. |
| 403 | Forbidden: The request was valid, but the server is refusing action. |
| 404 | Not Found: The requested resource could not be found but may be available in the future. |
| 405 | Method Not Allowed: A request method is not supported for the requested resource. |
| 409 | Conflict: Indicates that the request could not be processed because of conflict in the request. |
| 422 | Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors. |
| 429 | Too Many Requests: The user has sent too many requests in a given amount of time ("rate limiting"). |
| 500 | Internal Server Error: A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. |
When using index routes to retrieve lists of data, by default we limit the number of records returned to 20. You can using standard pagination to paginate results, ie: ?per_page=50
Attempts to authenticate with the API using a email/password combination.
After authenticating with the API, the returned object is a CompanyUser object which is a bridge linking the user to the company.
The company user object contains the users permissions (admin/owner or fine grained permissions) You will most likely want to also include in the response of this object both the company and the user object, this can be done by using the include parameter.
/api/v1/login?include=company,user
| include | string Examples:
Include child relations of the CompanyUser object, format is comma separated.
|
| include_static | string Example: include_static=include_static=true This include will return the full set of static variables used in the application including:
|
| clear_cache | string Example: clear_cache=clear_cache=true Clears cache Clears (and rebuilds) the static variable cache. |
| X-API-SECRET | string Example: password The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
{
"email" : "[email protected]",
"password" : "magicpassword123",
"one_time_password" : "12345",
}
| email required | string The users email address. |
| password required | string The user password. Must meet minimum criteria ~ > 6 characters |
| one_time_password | string The one time password if 2FA is enabled |
{- "password": "Password0",
- "one_time_password": "123456"
}{- "permissions": "create_invoice,create_client,view_client",
- "settings": { },
- "react_settings": { },
- "is_owner": true,
- "is_admin": true,
- "is_locked": true,
- "updated_at": 1231232312321,
- "deleted_at": 12312312321,
- "account": {
- "id": "AS3df3A",
- "account_sms_verified": "true"
}, - "company": {
- "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",
- "enabled_tax_rates": 2,
- "fill_products": true,
- "convert_products": true,
- "update_products": true,
- "show_product_details": true,
- "show_product_cost": true,
- "custom_fields": { },
- "enable_product_cost": true,
- "enable_product_quantity": true,
- "default_quantity": true,
- "custom_surcharge_taxes1": true,
- "custom_surcharge_taxes2": true,
- "custom_surcharge_taxes3": true,
- "custom_surcharge_taxes4": null,
- "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,
- "client_registration_fields": { },
- "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_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,
- "tax_data": { },
- "e_invoice_certificate": "-----BEGIN CERTIFICATE-----",
- "e_invoice_certificate_passphrase": "secret",
- "origin_tax_data": { },
- "invoice_task_project_header": true,
- "invoice_task_item_description": true,
- "expense_mailbox_active": true,
- "inbound_mailbox_allow_company_users": true,
- "inbound_mailbox_allow_vendors": false,
- "inbound_mailbox_allow_clients": true,
- "inbound_mailbox_allow_unknown": false,
- "smtp_host": "smtp.gmail.com",
- "smtp_port": 587,
- "smtp_encryption": "tls",
- "smtp_local_domain": "company.com",
- "smtp_verify_peer": true,
- "e_invoice": { },
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}
}, - "user": {
- "id": "Opnel5aKBz",
- "first_name": "Brad",
- "last_name": "Pitt",
- "phone": "555-1233-23232",
- "signature": "Have a nice day!",
- "accepted_terms_version": "1.0.1",
- "oauth_user_id": "jkhasdf789as6f675sdf768sdfs",
- "oauth_provider_id": "google",
- "language_id": "1",
- "verified_phone_number": true,
- "sms_verification_code": "123456",
- "oauth_user_token_expiry": "2022-10-10",
- "has_password": true,
- "custom_value1": "Custom value 1",
- "custom_value2": "$1000",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": true,
- "google_2fa_secret": "123456",
- "oauth_user_refresh_token": "refresh_token_abc123",
- "oauth_user_token": { },
- "shopify_user_id": "123456789",
- "user_logged_in_notification": true
}, - "token": {
- "name": "Token Name",
- "token": "AS3df3jUUH765fhfd9KJuidj3JShjA",
- "is_system": true
}
}The Clients API provides endpoints for managing client records within your company. A client represents a customer or business entity that you provide services or products to.
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.
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| status | string Example: status=?status=archived,deleted Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| name | string Example: name=bob Filter by client name
|
| balance | string Example: balance=lt:10 Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq
ie all clients whose balance is less than 10 |
| between_balance | string Example: between_balance=10:100 Filter between client balances, format uses two values separated by a colon
|
| id_number | string Example: id_number=a1039883 Filter by client id_number
|
| number | string Example: number=a1039883 Filter by client number
|
| filter | string Example: filter=a1039883 Broad filter which targets multiple client columns:
|
| sort | string Example: sort=id|desc name|desc balance|asc Returns the list sorted by column in ascending or descending order. Ensure you use column | direction, ie.
|
| group | string Example: group=X89sjd8 Returns the list of clients assigned to {group_id}
|
| client_id | string Example: client_id=X89sjd8 Returns the list of clients with {client_id} - proxy call to retrieve a client_id wrapped in an array
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoices = $ninja->clients->all([ 'balance' => 'lt:10', // get all clients with a balance less than 10 'per_page' => 10, // return 10 results per page 'page' => 2, // paginate to page 2 'include' => 'documents', // include the documents relationship ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds a client to a company
🚨 Important
When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation.
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
required | Array of objects (ClientContactRequest) A list of contacts associated with the client |
| name | string The name of the client company or organization |
| website | string The website URL of the client company or organization |
| private_notes | string Notes that are only visible to the user who created the client |
| industry_id | number The unique identifier of the industry the client operates in |
| size_id | number The unique identifier for the size category of the client company or organization |
| address1 | string First line of the client's address |
| address2 | string Second line of the client's address, if needed |
| city | string The city the client is located in |
| state | string The state, province, or locality the client is located in |
| postal_code | string The postal code or ZIP code of the client |
| phone | string The client's phone number |
required | Country Types (integer) (CountryType) |
| custom_value1 | string A custom field for storing additional information |
| custom_value2 | string A custom field for storing additional information |
| custom_value3 | string A custom field for storing additional information |
| custom_value4 | string A custom field for storing additional information |
| vat_number | string The client's VAT (Value Added Tax) number, if applicable |
| id_number | string A unique identification number for the client, such as a tax ID or business registration number |
| number | string A system-assigned unique number for the client, typically used for invoicing purposes |
| shipping_address1 | string First line of the client's shipping address |
| shipping_address2 | string Second line of the client's shipping address, if needed |
| shipping_city | string The city of the client's shipping address |
| shipping_state | string The state, province, or locality of the client's shipping address |
| shipping_postal_code | string The postal code or ZIP code of the client's shipping address |
| shipping_country_id | number <integer> The unique identifier of the client's shipping country expressed by the countries ISO number. Optionally, instead of the shipping_country_id you can pass either the iso_3166_2 or iso_3166_3 country code into the shipping_country_code property. |
| group_settings_id | string The group settings assigned to the client |
| routing_id | string The routing address id for e-invoicing for this client |
| is_tax_exempt | boolean Flag which defines if the client is exempt from taxes |
| has_valid_vat_number | boolean Flag which defines if the client has a valid VAT number |
| classification | string The classification of the client |
object (ClientSettings) |
{- "contacts": [
- {
- "first_name": "Sarah",
- "last_name": "Johnson",
- "phone": "+1-555-123-4567",
- "custom_value1": "Preferred Customer",
- "custom_value2": "West Region",
- "custom_value3": "Referral: Jane Smith",
- "custom_value4": "Account #12345",
- "password": "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
- "send_email": true
}
], - "name": "Bob & Co Housekeeping",
- "private_notes": "Client prefers email communication over phone calls",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "group_settings_id": "Opnel5aKBz",
- "routing_id": "Opnel5aKBz3489-dfkiu-2239-sdsd",
- "is_tax_exempt": false,
- "has_valid_vat_number": false,
- "classification": "individual",
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}
}{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Displays a client by id
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $client = $ninja->clients->show('clientId123');
{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Handles the updating of a client by id
🚨 Important
When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation.
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Client object that needs to be updated
required | Array of objects (ClientContactRequest) A list of contacts associated with the client |
| name | string The name of the client company or organization |
| website | string The website URL of the client company or organization |
| private_notes | string Notes that are only visible to the user who created the client |
| industry_id | number The unique identifier of the industry the client operates in |
| size_id | number The unique identifier for the size category of the client company or organization |
| address1 | string First line of the client's address |
| address2 | string Second line of the client's address, if needed |
| city | string The city the client is located in |
| state | string The state, province, or locality the client is located in |
| postal_code | string The postal code or ZIP code of the client |
| phone | string The client's phone number |
required | Country Types (integer) (CountryType) |
| custom_value1 | string A custom field for storing additional information |
| custom_value2 | string A custom field for storing additional information |
| custom_value3 | string A custom field for storing additional information |
| custom_value4 | string A custom field for storing additional information |
| vat_number | string The client's VAT (Value Added Tax) number, if applicable |
| id_number | string A unique identification number for the client, such as a tax ID or business registration number |
| number | string A system-assigned unique number for the client, typically used for invoicing purposes |
| shipping_address1 | string First line of the client's shipping address |
| shipping_address2 | string Second line of the client's shipping address, if needed |
| shipping_city | string The city of the client's shipping address |
| shipping_state | string The state, province, or locality of the client's shipping address |
| shipping_postal_code | string The postal code or ZIP code of the client's shipping address |
| shipping_country_id | number <integer> The unique identifier of the client's shipping country expressed by the countries ISO number. Optionally, instead of the shipping_country_id you can pass either the iso_3166_2 or iso_3166_3 country code into the shipping_country_code property. |
| group_settings_id | string The group settings assigned to the client |
| routing_id | string The routing address id for e-invoicing for this client |
| is_tax_exempt | boolean Flag which defines if the client is exempt from taxes |
| has_valid_vat_number | boolean Flag which defines if the client has a valid VAT number |
| classification | string The classification of the client |
object (ClientSettings) |
{- "contacts": [
- {
- "first_name": "Sarah",
- "last_name": "Johnson",
- "phone": "+1-555-123-4567",
- "custom_value1": "Preferred Customer",
- "custom_value2": "West Region",
- "custom_value3": "Referral: Jane Smith",
- "custom_value4": "Account #12345",
- "password": "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
- "send_email": true
}
], - "name": "Bob & Co Housekeeping",
- "private_notes": "Client prefers email communication over phone calls",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "group_settings_id": "Opnel5aKBz",
- "routing_id": "Opnel5aKBz3489-dfkiu-2239-sdsd",
- "is_tax_exempt": false,
- "has_valid_vat_number": false,
- "classification": "individual",
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}
}{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Handles the deletion of a client by id
❗ Note Deleting a client does not purge the client from the system. The delete action will remove the clients data from all views in the application but keep it on file in case it needs to be restored.
A Client can be later restored reversing this action.
To permanently wipe a client and all of their records from the system, use the /purge route
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->delete('clientId123');
{- "message": "These credentials do not match our records / Invalid Token"
}Displays a client by id, essentially an alias of the show route
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $client = $ninja->clients->show('clientId123');
{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Returns a blank object with default values
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $client = $ninja->clients->model();
{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Bulk actions allow to make changes to multiple clients in a single request the following actions are supported
All of these actions require an array of client ids to perform the requested action on ie.
"ids":['id1','id2']
actions such as template, assign_group and bulk_update also require additional properties to be passed in the request
The template bulk action allows the creation of a custom template using the provided template_id to be run against the array of clients provided.
Allows setting multiple clients to a single group
Allows updating certain columns on the client model in bulk. the current list of supported columns that can be updated archived_at:
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action array
| action | string The action to perform ie. archive / restore / delete |
| ids | Array of strings <string> [ items <string > ] |
{- "action": "archive",
- "ids": [
- "2J234DFA,D2J234DFA,D2J234DFA"
]
}{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}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
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| _method | string |
| documents[] | Array of strings <binary> [ items <binary > ] Array of files to upload. The files should be sent with the key name 'documents[]'. Supported file types:
Maximum file size: 20MB per file |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->upload('clientId123', '/path/to/document.pdf');
{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}Handles purging a client.
❗ Note This is a destructive action. This action will remove all data associated with the client and cannot be undone.
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| X-API-PASSWORD required | string Example: supersecretpassword The login password when challenged on certain protected routes |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->purge('clientId123');
{- "message": "These credentials do not match our records / Invalid Token"
}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.
🚨 Important
This action requires elevated permissions, please note the X-API-PASSWORD header requirements for this route.
| id required | string <string> Example: D2J234DFA The Client Hashed ID |
| mergeable_client_hashed_id required | string <string> Example: D2J234DFA The Mergeable Client Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| X-API-PASSWORD required | string Example: supersecretpassword The login password when challenged on certain protected routes |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->merge('primaryClientId', 'mergeableClientId');
{- "message": "These credentials do not match our records / Invalid Token"
}Return a PDF of the client statement
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Statement Options
| start_date | string The start date of the statement period - format Y-m-d |
| end_date | string The start date of the statement period - format Y-m-d |
| client_id | string The hashed ID of the client |
| show_payments_table | boolean Flag which determines if the payments table is shown |
| show_credits_table | boolean Flag which determines if the credits table is shown |
| show_aging_table | boolean Flag which determines if the aging table is shown |
{- "start_date": "string",
- "end_date": "string",
- "client_id": "string",
- "show_payments_table": true,
- "show_credits_table": true,
- "show_aging_table": true
}{- "id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "first_name": "John",
- "last_name": "Doe",
- "phone": "555-152-4524",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "email": "",
- "accepted_terms_version": "A long set of ToS",
- "password": "*****",
- "confirmation_code": "333-sdjkh34gbasd",
- "token": "333-sdjkh34gbasd",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "is_primary": true,
- "confirmed": true,
- "is_locked": true,
- "send_email": true,
- "failed_logins": 3,
- "email_verified_at": 134341234234,
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234
}
], - "user_id": "Ua6Rw4pVbS",
- "assigned_user_id": "Ua6Rw4pVbS",
- "name": "Jim's Housekeeping",
- "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": 0,
- "custom_value1": "Preferred contact: Email",
- "custom_value2": "Account manager: John Doe",
- "custom_value3": "VIP client: Yes",
- "custom_value4": "Annual contract value: $50,000",
- "vat_number": "VAT123456",
- "id_number": "string",
- "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,
- "paid_to_date": 2000,
- "credit_balance": 100,
- "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,
- "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",
- "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": true,
- "auto_archive_invoice": true,
- "auto_archive_quote": true,
- "auto_convert_quote": true,
- "inclusive_taxes": true,
- "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": { },
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florisa",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "email_template_custom2": "<HTML>",
- "email_template_custom3": "<HTML>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net or api.eu.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": false,
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith"
}, - "classification": "VIP",
- "public_notes": "These are public notes visible to clients"
}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.
| bounce_id required | string <string> Example: 123243 The postmark Bounce ID reference |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->reactivateEmail("bounce_id_123");
{- "message": "These credentials do not match our records / Invalid Token"
}Updates the clients tax data - if their address has changed
| client required | string <string> Example: V2J234DFA The Client Hashed ID reference |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->clients->updateTaxData("D2J234DFA", [ 'address1' => '123 New Street', 'city' => 'New York', 'state' => 'NY', 'postal_code' => '10001', 'country_id' => '1' ]);
{- "message": "These credentials do not match our records / Invalid Token"
}The Locations API provides endpoints for managing location records within your company. A location represents a physical address where you provide services or products to a client OR vendor.
Locations are additional addresses that are applicable to a client. This is useful when a client has multiple addresses for shipping, billing, etc.
When retrieving a list of locations you can chain query parameters to filter the dataset. For example:
/api/v1/locations?name=warehouse*
You can also sort the results:
/api/v1/locations?sort=name|desc
For pagination, use per_page and page parameters:
/api/v1/locations?per_page=15&page=2
The default per_page value is 20.
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| name | string Example: name=warehouse Filter by location name
|
| sort | string Example: sort=name|desc Returns the list sorted by column in ascending or descending order.
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoices = $ninja->locations->all([]);
{- "data": [
- {
- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}
]
}Adds a location to a company
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Location object that needs to be added to the company
| name | string The location name |
| address1 | string The first line of the address |
| address2 | string The second line of the address |
| city | string The city name |
| state | string The state or region |
| postal_code | string The postal or zip code |
| country_id | string The ID of the associated country |
| custom_value1 | string or null Custom field value 1 |
| custom_value2 | string or null Custom field value 2 |
| custom_value3 | string or null Custom field value 3 |
| custom_value4 | string or null Custom field value 4 |
| is_shipping_location | boolean Indicates if this is a shipping location |
| assigned_user_id | string The assigned user hashed id |
| client_id | string The client hashed id |
| vendor_id | string The vendor hashed id |
{- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_shipping_location": true,
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}{- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}Displays a location by id
| id required | string <string> Example: D2J234DFA The Location Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $location = $ninja->locations->show("D2J234DFA");
{- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}Handles the updating of a location by id
| id required | string <string> Example: D2J234DFA The Location Hashed ID |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Location object that needs to be updated
| name | string The location name |
| address1 | string The first line of the address |
| address2 | string The second line of the address |
| city | string The city name |
| state | string The state or region |
| postal_code | string The postal or zip code |
| country_id | string The ID of the associated country |
| custom_value1 | string or null Custom field value 1 |
| custom_value2 | string or null Custom field value 2 |
| custom_value3 | string or null Custom field value 3 |
| custom_value4 | string or null Custom field value 4 |
| is_shipping_location | boolean Indicates if this is a shipping location |
| assigned_user_id | string The assigned user hashed id |
| client_id | string The client hashed id |
| vendor_id | string The vendor hashed id |
{- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_shipping_location": true,
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}{- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}Handles the deletion of a location by id
| id required | string <string> Example: D2J234DFA The Location Hashed ID |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->locations->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Returns a blank object with default values
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $location = $ninja->locations->model();
{- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}Bulk actions allow to make changes to multiple locations in a single request. The following actions are supported:
All of these actions require an array of location ids to perform the requested action on ie.
"ids":['id1','id2']
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action array
| action | string The action to perform ie. archive / restore / delete |
| ids | Array of strings <string> [ items <string > ] |
{- "action": "archive",
- "ids": [
- "2J234DFA,D2J234DFA,D2J234DFA"
]
}{- "id": "Kd5S2M",
- "name": "Warehouse A",
- "address1": "123 Business Street",
- "address2": "Suite 100",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94107",
- "country_id": "840",
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "is_deleted": false,
- "is_shipping_location": true,
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "created_at": 1623456789,
- "updated_at": 1623456999
}Lists products within your company.
You can search and filter the result set using query parameters. These can be chained together allowing fine grained lists to be generated.
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| status | string Example: status=?status=archived,deleted Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
| client_id | string Example: client_id=?client_id={client_id} Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| vendor_id | string Example: vendor_id=?vendor_id={vendor_id} Filters the entity list by an associated vendor
|
| filter | string Example: filter=bob Filter by product name |
| product_key | string Example: product_key=bob Filter by product key |
| sort | string Example: sort=id|desc product_key|desc Returns the list sorted by column in ascending or descending order. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $products = $ninja->products->all([ 'filter' => 'search', 'per_page' => 20, 'page' => 1, 'include' => 'documents' ]);
{- "data": [
- {
- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds a product to a company
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Product object that needs to be added to the company
| assigned_user_id | string The hashed ID of the user assigned to this product. |
| project_id | string The hashed ID of the project that this product is associated with. |
| vendor_id | string The hashed ID of the vendor that this product is associated with. |
| custom_value1 | string Custom value field 1. |
| custom_value2 | string Custom value field 2. |
| custom_value3 | string Custom value field 3. |
| custom_value4 | string Custom value field 4. |
| product_key | string The product key. |
| notes | string Notes about the product. |
| cost | number <double> The cost of the product. |
| price | number <double> The price of the product. |
| quantity | number <double> Default: 1 The quantity of the product. |
| tax_name1 | string The default tax name associated with this product |
| tax_rate1 | number <double> The default tax rate for this product |
| tax_name2 | string The default tax name associated with this product |
| tax_rate2 | number <double> The default tax rate for this product |
| tax_name3 | string The default tax name associated with this product |
| tax_rate3 | number <double> The default tax rate for this product |
| in_stock_quantity | integer <int32> Default: 0 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. The query parameter ?update_in_stock_quantity=true MUST be passed if you wish to update this value manually. |
| stock_notification | boolean Default: true Indicates whether stock notifications are enabled for this product |
| stock_notification_threshold | integer <int32> Default: 0 The minimum quantity threshold for which stock notifications will be triggered |
| max_quantity | integer <int32> The maximum quantity that can be ordered for this product |
| product_image | string <uri-reference> The URL of the product image |
| tax_id | string Default: "1" The tax category id for this product.' The following constants are available (default = '1')
|
{- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Displays a product by id
| id required | string <string> Example: D2J234DFA The Product Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $product = $ninja->products->show("{id}");
{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Handles the updating of a product by id
| id required | string <string> Example: D2J234DFA The Product Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Product object that needs to be added to the company
| assigned_user_id | string The hashed ID of the user assigned to this product. |
| project_id | string The hashed ID of the project that this product is associated with. |
| vendor_id | string The hashed ID of the vendor that this product is associated with. |
| custom_value1 | string Custom value field 1. |
| custom_value2 | string Custom value field 2. |
| custom_value3 | string Custom value field 3. |
| custom_value4 | string Custom value field 4. |
| product_key | string The product key. |
| notes | string Notes about the product. |
| cost | number <double> The cost of the product. |
| price | number <double> The price of the product. |
| quantity | number <double> Default: 1 The quantity of the product. |
| tax_name1 | string The default tax name associated with this product |
| tax_rate1 | number <double> The default tax rate for this product |
| tax_name2 | string The default tax name associated with this product |
| tax_rate2 | number <double> The default tax rate for this product |
| tax_name3 | string The default tax name associated with this product |
| tax_rate3 | number <double> The default tax rate for this product |
| in_stock_quantity | integer <int32> Default: 0 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. The query parameter ?update_in_stock_quantity=true MUST be passed if you wish to update this value manually. |
| stock_notification | boolean Default: true Indicates whether stock notifications are enabled for this product |
| stock_notification_threshold | integer <int32> Default: 0 The minimum quantity threshold for which stock notifications will be triggered |
| max_quantity | integer <int32> The maximum quantity that can be ordered for this product |
| product_image | string <uri-reference> The URL of the product image |
| tax_id | string Default: "1" The tax category id for this product.' The following constants are available (default = '1')
|
{- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Handles the deletion of a product by id
| id required | string <string> Example: D2J234DFA The Product Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $ninja->products->bulk([ 'action' => 'delete', 'ids' => ['productId1', 'productId2'] ]);
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an Product by id
| id required | string <string> Example: D2J234DFA The Product Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $product = $ninja->products->show("{id}");
{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Returns a blank product object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $product = $ninja->products->model();
{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Archive / Restore / Delete / Set tax id in bulk
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action array
| action required | string The action to perform ie. archive / restore / delete / set_tax_id |
| ids required | Array of strings <string> [ items <string > ] |
| tax_id | string The tax rate id to set on the list of products The following constants are available (default = '1')
|
{- "action": "archive",
- "ids": [
- "2J234DFA,D2J234DFA,D2J234DFA"
], - "tax_id": "1"
}{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Handles the uploading of a document to a product"
| id required | string <string> Example: D2J234DFA The Product Hashed ID |
| include | string Examples:
Include child relationships of the Client Object. ie ?include=documents,system_logs
Usage:
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| _method | string |
| documents | Array of any <binary> [ items <binary > ] |
$ninja = new InvoiceNinja("your_token"); $product = $ninja->products->upload("id", "document");
{- "id": "eP01N",
- "user_id": "n30m4",
- "assigned_user_id": "pR0j3",
- "project_id": "pR0j3",
- "vendor_id": "pR0j3",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "product_key": "1234",
- "notes": "These are some notes about the product.",
- "cost": 10,
- "price": 20,
- "quantity": 5,
- "tax_name1": "Tax 1",
- "tax_rate1": 10,
- "tax_name2": "Tax 2",
- "tax_rate2": 5,
- "tax_name3": "Tax 3",
- "tax_rate3": 0,
- "archived_at": 1647604800,
- "created_at": 1647604800,
- "updated_at": 1647691496,
- "is_deleted": false,
- "in_stock_quantity": 0,
- "stock_notification": true,
- "stock_notification_threshold": 0,
- "max_quantity": 0,
- "product_image": "../dictionary",
- "tax_id": "1"
}Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| status | string Example: status=?status=archived,deleted Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
| client_id | string Example: client_id=?client_id={client_id} Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| vendor_id | string Example: vendor_id=?vendor_id={vendor_id} Filters the entity list by an associated vendor
|
| client_status | string Example: client_status=?client_status=paid,unpaid A comma separated list of invoice status strings. Valid options include:
|
| number | string Example: number=?number=INV-001 Search invoices by invoice number |
| filter | string Example: filter=?filter=bob Searches across a range of columns including:
|
| without_deleted_clients | string Example: without_deleted_clients=?without_deleted_clients= Returns the invoice list without the invoices of deleted clients. |
| overdue | string Example: overdue=?overdue= Returns the list of invoices that are overdue |
| payable | string Example: payable=?payable={client_id} 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 |
| sort | string Example: sort=id|desc number|desc balance|asc Returns the list sorted by column in ascending or descending order. |
| private_notes | string Example: private_notes=?private_notes=super secret Searches on the private_notes field of the invoices |
| date | string Example: date=?date=2022-01-01 Filters the invoices by invoice date returns a list of invoices after (and including) the date |
| date_range | string Example: date_range=?date_range=2022-01-01,2022-01-31 Filters the invoices by invoice date returns a list of invoices between two dates |
| status_id | integer Example: status_id=1 Filters the invoices by status id
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoices = $ninja->invoices->all([ 'per_page' => 10, 'page' => 1, 'sort' => 'number|asc' ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Creates an invoice for a client.
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]
?retry_e_send=true [Saves and retries the e-send for the invoice]
?redirect=https://example.com [Saves and redirects to the given url]
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| user_id | string The user hashed id |
| assigned_user_id | string The assigned user hashed id |
| client_id required | string The client hashed id |
| location_id | string The location id of the client this request related to |
| number | string The invoice number - is a unique alpha numeric number per invoice per company |
| po_number | string The purchase order associated with this invoice |
| terms | string The invoice terms |
| public_notes | string The public notes of the invoice |
| private_notes | string The private notes of the invoice |
| footer | string The invoice footer notes |
| custom_value1 | string A custom field value |
| custom_value2 | string A custom field value |
| custom_value3 | string A custom field value |
| custom_value4 | string A custom field value |
| tax_name1 | string The tax name |
| tax_name2 | string The tax name |
| tax_rate1 | number <float> The tax rate |
| tax_rate2 | number <float> The tax rate |
| tax_name3 | string The tax name |
| tax_rate3 | number <float> The tax rate |
Array of objects (InvoiceItem) An array of objects which define the line items of the invoice | |
Array of objects (InvoiceInvitationRequest) An array of objects which define the invitations of the invoice | |
| discount | number <float> The invoice discount, can be an amount or a percentage |
| partial | number <float> The deposit/partial amount |
| is_amount_discount | boolean Flag determining if the discount is an amount or a percentage |
| uses_inclusive_taxes | boolean Defines the type of taxes used as either inclusive or exclusive |
| date | string <date> The Invoice Date |
| partial_due_date | string <date> The due date for the deposit/partial amount |
| due_date | string <date> The due date of the invoice |
| custom_surcharge1 | number <float> First Custom Surcharge |
| custom_surcharge2 | number <float> Second Custom Surcharge |
| custom_surcharge3 | number <float> Third Custom Surcharge |
| custom_surcharge4 | number <float> Fourth Custom Surcharge |
| custom_surcharge_tax1 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax2 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax3 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax4 | boolean Toggles charging taxes on custom surcharge amounts |
| project_id | string The project associated with this invoice |
{- "user_id": "AxP7K9nY5z",
- "assigned_user_id": "Bw2M8vR4qL",
- "client_id": "Ht5N9cX3jK",
- "location_id": "Opnel5aKBz",
- "number": "INV-2024-0001",
- "po_number": "PO-2024-0123",
- "terms": "Net 30 - Payment is due within 30 days of invoice date",
- "public_notes": "Thank you for your business. Please include invoice number with payment.",
- "private_notes": "Client requested expedited delivery - premium rates apply",
- "footer": "Payment accepted via bank transfer or credit card",
- "custom_value1": "Department: Sales",
- "custom_value2": "Region: North America",
- "custom_value3": "Contract: C-2024-156",
- "custom_value4": "Priority: High",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 20,
- "tax_rate2": 5,
- "tax_name3": "State Tax",
- "tax_rate3": 8.5,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "client_contact_id": "Opnel5aKBz"
}
], - "discount": 15,
- "partial": 250,
- "is_amount_discount": true,
- "uses_inclusive_taxes": true,
- "date": "2024-03-15",
- "partial_due_date": "2024-03-29",
- "due_date": "2024-04-14",
- "custom_surcharge1": 25,
- "custom_surcharge2": 35,
- "custom_surcharge3": 45,
- "custom_surcharge4": 55,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz"
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Displays an invoice by id
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->get("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}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]
?retry_e_send=true [Saves and retries the e-send for the invoice]
?redirect=https://example.com [Saves and redirects to the given url]
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->update("D2J234DFA", [ 'date' => '2022-01-01', 'due_date' => '2022-01-31', 'private_notes' => 'super secret', 'public_notes' => 'public notes', 'line_items' => [ [ 'product_key' => 'sku_4_u', 'notes' => 'The actual product description', ] ] ]);
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Handles the deletion of an invoice by id.
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $ninja->invoices->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an invoice by id for editting
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Returns a blank object with default values
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->model();
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}There are multiple actions that are available including:
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action details
| email_type | string The email type to be sent, when bulk emailing invoices options include:
|
| action | string The action to be performed, options include:
|
| ids | Array of strings |
{- "action": "bulk_download",
- "ids": [
- "D2J234DFA",
- "D2J234DFA",
- "D2J234DFA"
]
}{- "message": "These credentials do not match our records / Invalid Token"
}Performs a custom action on an invoice.
The current range of actions are as follows
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| action required | string <string> Example: clone_to_quote The action string to be performed |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Downloads a specific invoice
| invitation_key required | string <string> Example: D2J234DFA The Invoice Invitation Key |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->download("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Downloads a specific invoice delivery notes
| id required | string <string> Example: D2J234DFA The Invoice Hahsed Id |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->deliveryNote("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Handles the uploading of a document to a invoice
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
$ninja = new InvoiceNinja("your_token"); $invoice = $ninja->invoices->upload("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| client_id | string Example: client_id=?client_id={client_id} Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| vendor_id | string Example: vendor_id=?vendor_id={vendor_id} Filters the entity list by an associated vendor
|
| filter | string Example: filter=?filter=bob Searches across a range of columns including:
|
| client_status | string Example: client_status=?client_status=active,paused A comma separated list of invoice status strings. Valid options include:
|
| sort | string Example: sort=id|desc number|desc balance|asc Returns the list sorted by column in ascending or descending order. |
| number | string Example: number=?number=123 Filters the list by number. |
| product_key | string Example: product_key=?product_key=123 Filters the list by product_key. |
| next_send_between | string Example: next_send_between=?next_send_between=2025-01-01|2025-01-31 Filters the list by next_send_between. |
| frequency_id | string Example: frequency_id=?frequency_id=1,2,3 Filters the list by frequency_id. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $invoices = $ninja->recurring_invoices->all([ 'per_page' => 10, 'page' => 1, 'sort' => 'number|asc' ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds a Recurring Invoice to the system
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Recurring invoice object that needs to be added to the company
| client_id required | string The hashed ID of the client |
| date required | string <date> Recurring invoice date |
| due_date required | string <date> Due date for the recurring invoice |
| frequency_id required | string Frequency ID for recurring invoice |
| remaining_cycles | string Number of remaining cycles |
| private_notes | string Private notes for the recurring invoice |
| public_notes | string Public notes for the recurring invoice |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
Array of objects (InvoiceItem) An array of objects which define the line items of the invoice |
{- "client_id": "D2J234DFA",
- "date": "2024-01-01",
- "due_date": "2024-01-31",
- "frequency_id": "1",
- "remaining_cycles": "5",
- "private_notes": "Internal notes about this recurring invoice",
- "public_notes": "Thank you for your business!",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Displays an RecurringInvoice by id
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $recurringInvoice = $ninja->recurringInvoices->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Handles the updating of an RecurringInvoice by id
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Handles the deletion of an RecurringInvoice by id
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an RecurringInvoice by id
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Returns a blank object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}There are multiple actions that are available including:
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action details
| action | string The action to be performed, options include:
|
| ids | Array of strings |
{- "action": "start",
- "ids": [
- "D2J234DFA",
- "D2J234DFA",
- "D2J234DFA"
]
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Performs a custom action on an RecurringInvoice.
The current range of actions are as follows
- clone_to_RecurringInvoice
- clone_to_quote
- history
- delivery_note
- mark_paid
- download
- archive
- delete
- email
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| action required | string <string> Example: clone_to_quote The action string to be performed |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Downloads a specific invoice
| invitation_key required | string <string> Example: D2J234DFA The Recurring Invoice Invitation Key |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "message": "These credentials do not match our records / Invalid Token"
}Handles the uploading of a document to a recurring_invoice
| id required | string <string> Example: D2J234DFA The RecurringInvoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "frequency_id": 4,
- "remaining_cycles": 4,
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": { },
- "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "auto_bill": "always",
- "auto_bill_enabled": true,
- "design_id": "Opnel5aKBz",
- "due_date_days": 30,
- "e_invoice": { },
- "exchange_rate": 1,
- "next_send_date_client": "2024-12-31",
- "project_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Lists payments, search and filters allow fine grained lists to be generated.
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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| status | string Example: status=?status=archived,deleted Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
| client_id | string Example: client_id=?client_id={client_id} Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| vendor_id | string Example: vendor_id=?vendor_id={vendor_id} Filters the entity list by an associated vendor
|
| filter | string Example: filter=?filter=10 Searches across a range of columns including:
|
| number | string Example: number=?number=0001 Search payments by payment number |
| sort | string Example: sort=id|desc number|desc balance|asc Returns the list sorted by column in ascending or descending order. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $payments = $ninja->payments->all([ 'per_page' => 10, 'page' => 1 ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds an Payment to the system
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| email_receipt | boolean If true, the payment will be emailed to the client. If false, no email will be sent. This will override any other email settings for payments. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
The payment request can be as simple as a client id and amount, or as complex as a full payment with invoices and associated credits that should be applied.
| client_id | string The client hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| client_contact_id | string The client contact hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_id | string The user hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type_id | string (PaymentType)
The payment type used to complete this payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| date | string The Payment date | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transaction_reference | string The transaction reference as defined by the payment gateway | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| assigned_user_id | string The assigned user hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private_notes | string The private notes of the payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| amount | number The amount of this payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (InvoicePaymentable) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (CreditPaymentable) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | string The payment number - is a unique alpha numeric number per payment per company |
{- "client_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "amount": 10,
- "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101"
}{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Displays an Payment by id
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $payment = $ninja->payments->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Handles the updating of an Payment by id
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Handles the deletion of an Payment by id
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->payments->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an Payment by id
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Returns a blank object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Adds an Refund to the system
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
The refund request
| id | string The payment hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| client_id | string The client hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| invitation_id | string The invitation hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| client_contact_id | string The client contact hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_id | string The user hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type_id | string (PaymentType)
The payment type used to complete this payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| date | string The Payment date | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transaction_reference | string The transaction reference as defined by the payment gateway | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| assigned_user_id | string The assigned user hashed id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private_notes | string The private notes of the payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_manual | boolean Flags whether the payment was made manually or processed via a gateway | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_deleted | boolean Defines if the payment has been deleted | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| amount | number The amount of this payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| refunded | number The refunded amount of this payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updated_at | number <integer> Timestamp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| archived_at | number <integer> Timestamp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| company_gateway_id | string The company gateway id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object (Paymentable) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (InvoicePaymentable) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (CreditPaymentable) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| number | string The payment number - is a unique alpha numeric number per payment per company | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| category_id | string The unique identifier of the payment category | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| custom_value1 | string Custom field for storing additional information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| custom_value2 | string Custom field for storing additional information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| custom_value3 | string Custom field for storing additional information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| custom_value4 | string Custom field for storing additional information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exchange_currency_id | string The unique identifier of the exchange currency | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exchange_rate | number <float> The exchange rate used for currency conversion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| idempotency_key | string Unique key to ensure idempotent payment processing |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
Array of hashed IDs to be bulk 'actioned
[- 0
]{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Performs a custom action on an Payment.
The current range of actions are as follows
- clone_to_Payment
- clone_to_quote
- history
- delivery_note
- mark_paid
- download
- archive
- delete
- email
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| action required | string <string> Example: clone_to_quote The action string to be performed |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Handles the uploading of a document to a payment
| id required | string <string> Example: D2J234DFA The Payment Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invitation_id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "type_id": "1",
- "date": "1-1-2014",
- "transaction_reference": "xcsSxcs124asd",
- "assigned_user_id": "Opnel5aKBz",
- "private_notes": "The payment was refunded due to error",
- "is_manual": true,
- "is_deleted": true,
- "amount": 10,
- "refunded": 10,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "company_gateway_id": "3",
- "paymentables": {
- "id": "AS3df3A",
- "invoice_id": "AS3df3A",
- "credit_id": "AS3df3A",
- "refunded": 10,
- "amount": 10,
- "updated_at": 1434342123,
- "created_at": 1434342123
}, - "invoices": [
- {
- "invoice_id": "Opnel5aKBz",
- "amount": "2"
}
], - "credits": [
- {
- "credit_id": "Opnel5aKBz",
- "amount": "2"
}
], - "number": "PAY_101",
- "category_id": "Opnel5aKBz",
- "custom_value1": "Payment reference 123",
- "custom_value2": "Approved by John",
- "custom_value3": "Urgent payment",
- "custom_value4": "Q1 2024",
- "exchange_currency_id": "2",
- "exchange_rate": 1,
- "idempotency_key": "key_1234567890abcdef"
}Downloads a specific quote
| invitation_key required | string <string> Example: D2J234DFA The Credit Invitation Key |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "message": "These credentials do not match our records / Invalid Token"
}Lists quotes, search and filters allow fine grained lists to be generated.
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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| status | string Example: status=?status=archived,deleted Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
| client_id | string Example: client_id=?client_id={client_id} Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
| created_at | integer Example: created_at=1641772800 Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
| updated_at | integer Example: updated_at=1641772800 Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
| is_deleted | boolean Example: is_deleted=true Filters the entity list by entities that have been deleted.
|
| filter_deleted_clients | string Example: filter_deleted_clients=?filter_deleted_clients=true Filters the entity list and only returns entities for clients that have not been deleted
|
| vendor_id | string Example: vendor_id=?vendor_id={vendor_id} Filters the entity list by an associated vendor
|
| filter | string Example: filter=?filter=bob Searches across a range of columns including:
|
| client_status | string Example: client_status=?client_status=paid,unpaid A comma separated list of quote status strings. Valid options include:
|
| number | string Example: number=?number=Q-001 Search quote by quote number |
| sort | string Example: sort=id|desc number|desc balance|asc Returns the list sorted by column in ascending or descending order. |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $quotes = $ninja->quotes->all([ 'per_page' => 10, 'page' => 1, 'sort' => 'number|asc' ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Creates an quote for a client.
Triggered actions are available when updating or creating an quote.
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 quote]
?mark_sent=true [Saves and marks the quote as sent]
?approve=true [Saves and approves the quote]
?convert=true [Saves and converts the quote to an invoice]
?save_default_footer=true [Saves the current footer as the default footer]
?save_default_terms=true [Saves the current terms as the default terms]
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Quote object that needs to be added to the company
| client_id required | string The hashed ID of the client |
| date required | string <date> Quote date |
| due_date required | string <date> Due date for the quote |
| private_notes | string Private notes for the quote |
| public_notes | string Public notes for the quote |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
Array of objects (InvoiceItem) An array of objects which define the line items of the quote |
{- "client_id": "D2J234DFA",
- "date": "2024-01-01",
- "due_date": "2024-01-31",
- "private_notes": "Internal notes about this quote",
- "public_notes": "Thank you for your business!",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Displays an Quote by id
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $quote = $ninja->quotes->get("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Handles the updating of an Quote by id.
Triggered actions are available when updating or creating an quote.
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 quote]
?mark_sent=true [Saves and marks the quote as sent]
?approve=true [Saves and approves the quote]
?convert=true [Saves and converts the quote to an invoice]
?save_default_footer=true [Saves the current footer as the default footer]
?save_default_terms=true [Saves the current terms as the default terms]
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Quote object that needs to be updated
| client_id required | string The hashed ID of the client |
| date required | string <date> Quote date |
| due_date required | string <date> Due date for the quote |
| private_notes | string Private notes for the quote |
| public_notes | string Public notes for the quote |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
Array of objects (InvoiceItem) An array of objects which define the line items of the quote |
{- "client_id": "D2J234DFA",
- "date": "2024-01-01",
- "due_date": "2024-01-31",
- "private_notes": "Internal notes about this quote",
- "public_notes": "Thank you for your business!",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Handles the deletion of an Quote by id.
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $ninja->quotes->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an Quote by id for editting
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $quote = $ninja->quotes->edit("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Returns a blank object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("your_token"); $quote = $ninja->quotes->create();
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Performs bulk actions on an array of quotes
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Bulk action details
| action | string The action to be performed, options include:
|
| ids | Array of strings |
{- "action": "convert",
- "ids": [
- "D2J234DFA",
- "D2J234DFA",
- "D2J234DFA"
]
}{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Performs a custom action on an Quote.
The current range of actions are as follows
- clone_to_quote
- history
- delivery_note
- mark_paid
- download
- archive
- delete
- convert
- convert_to_invoice
- email
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| action required | string <string> Example: clone_to_quote The action string to be performed |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Downloads a specific quote
| invitation_key required | string <string> Example: D2J234DFA The Quote Invitation Key |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "message": "These credentials do not match our records / Invalid Token"
}Handles the uploading of a document to a quote
| id required | string <string> Example: D2J234DFA The Quote Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "client_id": "",
- "status_id": "",
- "number": "QUOTE_101",
- "po_number": "PO-1234",
- "terms": "These are some quote terms. Valid for 14 days.",
- "public_notes": "These are public notes which the client may see",
- "private_notes": "These are private notes, not to be disclosed to the client",
- "footer": "The text goes in the footer of the quote",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Lists credits, search and filters allow fine grained lists to be generated. * * 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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $credits = $ninja->credits->all([ 'per_page' => 10, 'page' => 1 ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "1a2b3c4d5e",
- "assigned_user_id": "6f7g8h9i0j",
- "client_id": "p1q2r3s4t5",
- "status_id": "3",
- "invoice_id": "u1v2w3x4y5",
- "number": "QUOTE_101",
- "po_number": "PO_12345",
- "terms": "Net 30",
- "public_notes": "Thank you for your business.",
- "private_notes": "Client is requesting a discount.",
- "footer": "Footer text goes here.",
- "custom_value1": "Custom data 1",
- "custom_value2": "Custom data 2",
- "custom_value3": "Custom data 3",
- "custom_value4": "Custom data 4",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 10,
- "tax_rate2": 5,
- "tax_name3": "PST",
- "tax_rate3": 8,
- "total_taxes": 23,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 100,
- "balance": 50,
- "paid_to_date": 50,
- "discount": 10,
- "partial": 20,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds an credit to the system
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
| user_id | string The user hashed id |
| assigned_user_id | string The assigned user hashed id |
| client_id required | string The client hashed id |
| number | string The credit number - is a unique alpha numeric number per credit per company |
| po_number | string The purchase order associated with this credit |
| terms | string The credit terms |
| public_notes | string The public notes of the credit |
| private_notes | string The private notes of the credit |
| footer | string The credit footer notes |
| custom_value1 | string A custom field value |
| custom_value2 | string A custom field value |
| custom_value3 | string A custom field value |
| custom_value4 | string A custom field value |
| tax_name1 | string The tax name |
| tax_name2 | string The tax name |
| tax_rate1 | number <float> The tax rate |
| tax_rate2 | number <float> The tax rate |
| tax_name3 | string The tax name |
| tax_rate3 | number <float> The tax rate |
Array of objects (InvoiceItem) An array of objects which define the line items of the credit | |
Array of objects (CreditInvitationRequest) An array of objects which define the invitations of the credit | |
| discount | number <float> The credit discount, can be an amount or a percentage |
| partial | number <float> The deposit/partial amount |
| is_amount_discount | boolean Flag determining if the discount is an amount or a percentage |
| uses_inclusive_taxes | boolean Defines the type of taxes used as either inclusive or exclusive |
| date | string <date> The credit Date |
| partial_due_date | string <date> The due date for the deposit/partial amount |
| due_date | string <date> The due date of the credit |
| custom_surcharge1 | number <float> First Custom Surcharge |
| custom_surcharge2 | number <float> Second Custom Surcharge |
| custom_surcharge3 | number <float> Third Custom Surcharge |
| custom_surcharge4 | number <float> Fourth Custom Surcharge |
| custom_surcharge_tax1 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax2 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax3 | boolean Toggles charging taxes on custom surcharge amounts |
| custom_surcharge_tax4 | boolean Toggles charging taxes on custom surcharge amounts |
| project_id | string The project associated with this credit |
{- "user_id": "AxP7K9nY5z",
- "assigned_user_id": "Bw2M8vR4qL",
- "client_id": "Ht5N9cX3jK",
- "number": "INV-2024-0001",
- "po_number": "PO-2024-0123",
- "terms": "Net 30 - Payment is due within 30 days of credit date",
- "public_notes": "Thank you for your business. Please include credit number with payment.",
- "private_notes": "Client requested expedited delivery - premium rates apply",
- "footer": "Payment accepted via bank transfer or credit card",
- "custom_value1": "Department: Sales",
- "custom_value2": "Region: North America",
- "custom_value3": "Contract: C-2024-156",
- "custom_value4": "Priority: High",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 20,
- "tax_rate2": 5,
- "tax_name3": "State Tax",
- "tax_rate3": 8.5,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "client_contact_id": "Opnel5aKBz"
}
], - "discount": 15,
- "partial": 250,
- "is_amount_discount": true,
- "uses_inclusive_taxes": true,
- "date": "2024-03-15",
- "partial_due_date": "2024-03-29",
- "due_date": "2024-04-14",
- "custom_surcharge1": 25,
- "custom_surcharge2": 35,
- "custom_surcharge3": 45,
- "custom_surcharge4": 55,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz"
}{- "id": "Opnel5aKBz",
- "user_id": "1a2b3c4d5e",
- "assigned_user_id": "6f7g8h9i0j",
- "client_id": "p1q2r3s4t5",
- "status_id": "3",
- "invoice_id": "u1v2w3x4y5",
- "number": "QUOTE_101",
- "po_number": "PO_12345",
- "terms": "Net 30",
- "public_notes": "Thank you for your business.",
- "private_notes": "Client is requesting a discount.",
- "footer": "Footer text goes here.",
- "custom_value1": "Custom data 1",
- "custom_value2": "Custom data 2",
- "custom_value3": "Custom data 3",
- "custom_value4": "Custom data 4",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 10,
- "tax_rate2": 5,
- "tax_name3": "PST",
- "tax_rate3": 8,
- "total_taxes": 23,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 100,
- "balance": 50,
- "paid_to_date": 50,
- "discount": 10,
- "partial": 20,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Displays an credit by id
| id required | string <string> Example: D2J234DFA The Credit Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $credit = $ninja->credits->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "1a2b3c4d5e",
- "assigned_user_id": "6f7g8h9i0j",
- "client_id": "p1q2r3s4t5",
- "status_id": "3",
- "invoice_id": "u1v2w3x4y5",
- "number": "QUOTE_101",
- "po_number": "PO_12345",
- "terms": "Net 30",
- "public_notes": "Thank you for your business.",
- "private_notes": "Client is requesting a discount.",
- "footer": "Footer text goes here.",
- "custom_value1": "Custom data 1",
- "custom_value2": "Custom data 2",
- "custom_value3": "Custom data 3",
- "custom_value4": "Custom data 4",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 10,
- "tax_rate2": 5,
- "tax_name3": "PST",
- "tax_rate3": 8,
- "total_taxes": 23,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 100,
- "balance": 50,
- "paid_to_date": 50,
- "discount": 10,
- "partial": 20,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Handles the deletion of an credit by id
| id required | string <string> Example: D2J234DFA The Credit Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->credits->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an credit by id
| id required | string <string> Example: D2J234DFA The Invoice Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "status_id": "4",
- "number": "INV_101",
- "po_number": "PO-1234",
- "terms": "These are invoice terms",
- "public_notes": "These are some public notes",
- "private_notes": "These are some private notes",
- "footer": "",
- "custom_value1": "2022-10-01",
- "custom_value2": "Something custom",
- "custom_value3": "",
- "custom_value4": "",
- "tax_name1": "",
- "tax_name2": "",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": true,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "project_id": "Opnel5aKBz",
- "auto_bill_tries": 1,
- "auto_bill_enabled": true,
- "subscription_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "e_invoice": { },
- "exchange_rate": 1,
- "vendor_id": "Opnel5aKBz"
}Returns a blank object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "1a2b3c4d5e",
- "assigned_user_id": "6f7g8h9i0j",
- "client_id": "p1q2r3s4t5",
- "status_id": "3",
- "invoice_id": "u1v2w3x4y5",
- "number": "QUOTE_101",
- "po_number": "PO_12345",
- "terms": "Net 30",
- "public_notes": "Thank you for your business.",
- "private_notes": "Client is requesting a discount.",
- "footer": "Footer text goes here.",
- "custom_value1": "Custom data 1",
- "custom_value2": "Custom data 2",
- "custom_value3": "Custom data 3",
- "custom_value4": "Custom data 4",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 10,
- "tax_rate2": 5,
- "tax_name3": "PST",
- "tax_rate3": 8,
- "total_taxes": 23,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 100,
- "balance": 50,
- "paid_to_date": 50,
- "discount": 10,
- "partial": 20,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
Array of hashed IDs to be bulk 'actioned
[- "[D2J234DFA,D2J234DFA,D2J234DFA]"
]{- "message": "These credentials do not match our records / Invalid Token"
}Handles the uploading of a document to a credit
| id required | string <string> Example: D2J234DFA The Credit Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "1a2b3c4d5e",
- "assigned_user_id": "6f7g8h9i0j",
- "client_id": "p1q2r3s4t5",
- "status_id": "3",
- "invoice_id": "u1v2w3x4y5",
- "number": "QUOTE_101",
- "po_number": "PO_12345",
- "terms": "Net 30",
- "public_notes": "Thank you for your business.",
- "private_notes": "Client is requesting a discount.",
- "footer": "Footer text goes here.",
- "custom_value1": "Custom data 1",
- "custom_value2": "Custom data 2",
- "custom_value3": "Custom data 3",
- "custom_value4": "Custom data 4",
- "tax_name1": "VAT",
- "tax_name2": "GST",
- "tax_rate1": 10,
- "tax_rate2": 5,
- "tax_name3": "PST",
- "tax_rate3": 8,
- "total_taxes": 23,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "invitations": [
- {
- "id": "Opnel5aKBz",
- "client_contact_id": "Opnel5aKBz",
- "key": "Opnel5aKBz4343343566236gvbb",
- "sent_date": "2019-08-24T14:15:22Z",
- "viewed_date": "2019-08-24T14:15:22Z",
- "opened_date": "2019-08-24T14:15:22Z",
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "email_error": "The email error",
- "email_status": "string"
}
], - "amount": 100,
- "balance": 50,
- "paid_to_date": 50,
- "discount": 10,
- "partial": 20,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "location_id": "Opnel5aKBz",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "project_id": "Opnel5aKBz",
- "subscription_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz"
}Lists projects
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $projects = $ninja->projects->all([ 'per_page' => 10, 'page' => 1 ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds an project to a company
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Project object that needs to be added to the company
| name required | string Project name |
| client_id required | string The hashed ID of the client |
| description | string Project description |
| budgeted_hours | number Budgeted hours for the project |
| task_rate | number Hourly rate for tasks in this project |
| due_date | string <date> Due date for the project |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the project is deleted |
| archived_at | integer Timestamp when project was archived |
| color | string Project color for UI display |
{- "name": "Website Redesign Project",
- "client_id": "D2J234DFA",
- "description": "Complete redesign of company website",
- "budgeted_hours": 120.5,
- "task_rate": 75,
- "due_date": "2024-03-31",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "color": "#FF5733"
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Displays a project by id
| id required | string <string> Example: D2J234DFA The Project Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $project = $ninja->projects->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Handles the updating of a project by id
| id required | string <string> Example: D2J234DFA The Project Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Project object that needs to be updated
| name required | string Project name |
| client_id required | string The hashed ID of the client |
| description | string Project description |
| budgeted_hours | number Budgeted hours for the project |
| task_rate | number Hourly rate for tasks in this project |
| due_date | string <date> Due date for the project |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the project is deleted |
| archived_at | integer Timestamp when project was archived |
| color | string Project color for UI display |
{- "name": "Website Redesign Project",
- "client_id": "D2J234DFA",
- "description": "Complete redesign of company website",
- "budgeted_hours": 120.5,
- "task_rate": 75,
- "due_date": "2024-03-31",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "color": "#FF5733"
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Handles the deletion of a project by id
| id required | string <string> Example: D2J234DFA The Project Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->projects->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays a project by id
| id required | string <string> Example: D2J234DFA The Project Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $project = $ninja->projects->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Returns a blank object with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $project = $ninja->projects->model();
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
Array of hashed IDs to be bulk 'actioned
[- 0
]{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Handles the uploading of a document to a project
| id required | string <string> Example: D2J234DFA The Project Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "name": "New Project",
- "task_rate": 10,
- "due_date": "2019-01-01",
- "private_notes": "string",
- "budgeted_hours": 0.1,
- "custom_value1": "string",
- "custom_value2": "string",
- "custom_value3": "string",
- "custom_value4": "string",
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "archived_at": 134341234234,
- "public_notes": "string",
- "is_deleted": true,
- "number": "string",
- "color": "string"
}Lists tasks, search and filters allow fine grained lists to be generated. * * 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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $tasks = $ninja->tasks->all([ 'per_page' => 10, 'page' => 1, 'client_id' => 'D2J234DFA' ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds an task to a company
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Task object that needs to be added to the company
| description required | string Task description |
| client_id | string The hashed ID of the client |
| project_id | string The hashed ID of the project |
| time_log | string Time logged for the task |
| status_id | integer Status ID of the task |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the task is deleted |
| archived_at | integer Timestamp when task was archived |
| due_date | string <date> Due date for the task |
| priority | integer Priority level of the task |
{- "description": "Complete project documentation",
- "client_id": "D2J234DFA",
- "project_id": "P2J234DFA",
- "time_log": "2.5",
- "status_id": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "due_date": "2024-01-31",
- "priority": 1
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Displays a task by id
| id required | string <string> Example: D2J234DFA The Task Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $task = $ninja->tasks->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Handles the updating of a task by id
| id required | string <string> Example: D2J234DFA The task Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Task object that needs to be updated
| description required | string Task description |
| client_id | string The hashed ID of the client |
| project_id | string The hashed ID of the project |
| time_log | string Time logged for the task |
| status_id | integer Status ID of the task |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the task is deleted |
| archived_at | integer Timestamp when task was archived |
| due_date | string <date> Due date for the task |
| priority | integer Priority level of the task |
{- "description": "Complete project documentation",
- "client_id": "D2J234DFA",
- "project_id": "P2J234DFA",
- "time_log": "2.5",
- "status_id": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "due_date": "2024-01-31",
- "priority": 1
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Handles the deletion of a task by id
| id required | string <string> Example: D2J234DFA The Task Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->tasks->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays a task by id
| id required | string <string> Example: D2J234DFA The Task Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $task = $ninja->tasks->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Returns a blank task with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $task = $ninja->tasks->model();
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
Array of hashed IDs to be bulk 'actioned
[- 0
]{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Handles the uploading of a document to a task
| id required | string <string> Example: D2J234DFA The Task Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "client_id": "Opnel5aKBz",
- "invoice_id": "Opnel5aKBz",
- "project_id": "Opnel5aKBz",
- "number": "TASK-123",
- "time_log": "[[1,2],[3,4]]",
- "is_running": true,
- "is_deleted": true,
- "task_status_id": "Opnel5aKBz",
- "description": "A wonder task to work on",
- "duration": 3600,
- "task_status_order": 4,
- "rate": 10,
- "custom_value1": "2022-10-10",
- "custom_value2": "$1100",
- "custom_value3": "I need help",
- "custom_value4": "INV-3343",
- "is_date_based": true,
- "calculated_start_date": "2022-10-10",
- "invoice_documents": true,
- "created_at": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "hash": "a1b2c3d4e5f6",
- "meta": { },
- "status_id": "Opnel5aKBz",
- "status_order": 1,
- "status_sort_order": 1
}Sorts tasks after drag and drop on the KanBan.
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Task sort order data
| task_ids required | Array of strings Array of task IDs to be sorted |
| status_id | integer Status ID to assign to sorted tasks |
| sort_order | Array of strings Array of task IDs in the desired sort order |
{- "task_ids": [
- "D2J234DFA"
], - "status_id": 1,
- "sort_order": [
- "D2J234DFA"
]
}{- "message": "These credentials do not match our records / Invalid Token"
}Lists vendors, search and filters allow fine grained lists to be generated.
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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $vendors = $ninja->vendors->all([ 'per_page' => 10, 'page' => 1 ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds a vendor to a company
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Vendor object that needs to be added to the company
| name required | string Vendor name |
| address1 | string Primary address line |
| address2 | string Secondary address line |
| city | string City |
| state | string State or province |
| postal_code | string Postal code |
| country_id | string Country ID |
| phone | string Phone number |
string <email> Email address | |
| website | string <uri> Website URL |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the vendor is deleted |
| archived_at | integer Timestamp when vendor was archived |
Array of objects Array of vendor contacts |
{- "name": "ABC Supply Company",
- "address1": "123 Main Street",
- "address2": "Suite 100",
- "city": "New York",
- "state": "NY",
- "postal_code": "10001",
- "country_id": "1",
- "phone": "+1-555-123-4567",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "contacts": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone": "+1-555-123-4567",
- "send_email": true
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Displays a vendor by id
| id required | string <string> Example: D2J234DFA The vendor Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $vendor = $ninja->vendors->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Handles the updating of a vendor by id
| id required | string <string> Example: D2J234DFA The Vendor Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Vendor object that needs to be updated
| name required | string Vendor name |
| address1 | string Primary address line |
| address2 | string Secondary address line |
| city | string City |
| state | string State or province |
| postal_code | string Postal code |
| country_id | string Country ID |
| phone | string Phone number |
string <email> Email address | |
| website | string <uri> Website URL |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
| is_deleted | boolean Whether the vendor is deleted |
| archived_at | integer Timestamp when vendor was archived |
Array of objects Array of vendor contacts |
{- "name": "ABC Supply Company",
- "address1": "123 Main Street",
- "address2": "Suite 100",
- "city": "New York",
- "state": "NY",
- "postal_code": "10001",
- "country_id": "1",
- "phone": "+1-555-123-4567",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "is_deleted": false,
- "archived_at": 1640995200,
- "contacts": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone": "+1-555-123-4567",
- "send_email": true
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Handles the deletion of a vendor by id
| id required | string <string> Example: D2J234DFA The Vendor Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $ninja->vendors->delete("D2J234DFA");
{- "message": "These credentials do not match our records / Invalid Token"
}Displays a vendor by id
| id required | string <string> Example: D2J234DFA The Vendor Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $vendor = $ninja->vendors->show("D2J234DFA");
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Returns a blank vendor with default values
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $vendor = $ninja->vendors->model();
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
User credentials
Array of hashed IDs to be bulk 'actioned
[- 0
]{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Handles the uploading of a document to a vendor
| id required | string <string> Example: D2J234DFA The Vendor Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
File Upload Body
| _method | string |
| documents | Array of strings <binary> [ items <binary > ] |
{- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "assigned_user_id": "Opnel5aKBz",
- "contacts": [
- {
- "id": "Opnel5aKBz",
- "user_id": "Opnel5aKBz",
- "vendor_id": "Opnel5aKBz",
- "first_name": "Harry",
- "last_name": "Windsor",
- "contact_key": "JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a",
- "confirmation_code": "333-sdjkh34gbasd",
- "phone": "555-123-1234",
- "custom_value1": "2022-10-10",
- "custom_value2": "$1000",
- "custom_value3": "",
- "custom_value4": "",
- "email_verified_at": 134341234234,
- "password": "*****",
- "is_primary": true,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "deleted_at": 134341234234,
- "send_email": true
}
], - "name": "Harry cafe de wheels",
- "classification": "individual",
- "website": "www.harry.com",
- "private_notes": "Shhh, do not tell the vendor",
- "industry_id": "1",
- "size_id": "",
- "address1": "",
- "address2": "",
- "city": "",
- "state": "",
- "postal_code": "",
- "phone": "555-3434-3434",
- "country_id": "",
- "currency_id": "4",
- "custom_value1": "",
- "custom_value2": "",
- "custom_value3": "",
- "custom_value4": "",
- "vat_number": "",
- "id_number": "",
- "number": "11234",
- "is_deleted": true,
- "language_id": "1",
- "vendor_hash": "aaa-sss-www",
- "transaction_name": "aaa-sss-www",
- "last_login": 134341234234,
- "created_at": 134341234234,
- "updated_at": 134341234234,
- "display_name": "Bob the vendor",
- "is_tax_exempt": false,
- "public_notes": "These are public notes visible to vendors",
- "routing_id": "0088:12345678901"
}Lists purchase orders, search and filters allow fine grained lists to be generated. * * 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
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| index | string Example: index=user Replaces the default response index from data to a user specific string ie.
response is wrapped
|
| per_page | integer Example: per_page=20 The number of records to return for each request, default is 20 |
| page | integer Example: page=1 The page number to return for this request (when performing pagination), default is 1 |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
$ninja = new InvoiceNinja("YOUR-TOKEN"); $purchaseOrders = $ninja->purchaseOrders->all([ 'per_page' => 10, 'page' => 1 ]);
{- "data": [
- {
- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "vendor_id": "",
- "status_id": "",
- "number": "PO_101",
- "quote_number": "QUOTE_101",
- "terms": "These are some purchase order terms. Valid for 14 days.",
- "public_notes": "These are public notes which the vendor may see",
- "private_notes": "These are private notes, not to be disclosed to the vendor",
- "footer": "The text goes in the footer of the purchase order",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "backup": "backup_data.json",
- "client_id": "Opnel5aKBz",
- "currency_id": "1",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "invoice_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "po_number": "PO-2024-001",
- "project_id": "Opnel5aKBz",
- "recurring_id": "Opnel5aKBz",
- "reminder1_sent": 1234567890,
- "reminder2_sent": 1234567890,
- "reminder3_sent": 1234567890,
- "reminder_last_sent": 1234567890
}
], - "meta": {
- "pagination": {
- "total": 1,
- "count": 1,
- "per_page": 1,
- "current_page": 1,
- "total_pages": 1,
- "links": { }
}
}
}Adds a purchase order to the system
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Purchase order object that needs to be added to the company
| vendor_id required | string The hashed ID of the vendor |
| date required | string <date> Purchase order date |
| due_date required | string <date> Due date for the purchase order |
| private_notes | string Private notes for the purchase order |
| public_notes | string Public notes for the purchase order |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
Array of objects Array of line items for the purchase order |
{- "vendor_id": "D2J234DFA",
- "date": "2024-01-01",
- "due_date": "2024-01-31",
- "private_notes": "Internal notes about this purchase order",
- "public_notes": "Please deliver to our warehouse",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "line_items": [
- {
- "quantity": 10,
- "cost": 25,
- "product_key": "PROD_001",
- "notes": "Office supplies",
- "discount": 0,
- "is_amount_discount": true,
- "tax_name1": "Sales Tax",
- "tax_rate1": 8.5,
- "tax_name2": "",
- "tax_rate2": 0,
- "tax_name3": "",
- "tax_rate3": 0,
- "sort_id": "0",
- "custom_value1": "Department: IT",
- "custom_value2": "Priority: High",
- "custom_value3": "Approved by Manager",
- "custom_value4": "Budget Code: IT-2024",
- "type_id": "1",
- "tax_id": "1"
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "vendor_id": "",
- "status_id": "",
- "number": "PO_101",
- "quote_number": "QUOTE_101",
- "terms": "These are some purchase order terms. Valid for 14 days.",
- "public_notes": "These are public notes which the vendor may see",
- "private_notes": "These are private notes, not to be disclosed to the vendor",
- "footer": "The text goes in the footer of the purchase order",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "backup": "backup_data.json",
- "client_id": "Opnel5aKBz",
- "currency_id": "1",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "invoice_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "po_number": "PO-2024-001",
- "project_id": "Opnel5aKBz",
- "recurring_id": "Opnel5aKBz",
- "reminder1_sent": 1234567890,
- "reminder2_sent": 1234567890,
- "reminder3_sent": 1234567890,
- "reminder_last_sent": 1234567890
}Displays an purchase order by id
| id required | string <string> Example: D2J234DFA The Purchase order Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "vendor_id": "",
- "status_id": "",
- "number": "PO_101",
- "quote_number": "QUOTE_101",
- "terms": "These are some purchase order terms. Valid for 14 days.",
- "public_notes": "These are public notes which the vendor may see",
- "private_notes": "These are private notes, not to be disclosed to the vendor",
- "footer": "The text goes in the footer of the purchase order",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "backup": "backup_data.json",
- "client_id": "Opnel5aKBz",
- "currency_id": "1",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "invoice_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "po_number": "PO-2024-001",
- "project_id": "Opnel5aKBz",
- "recurring_id": "Opnel5aKBz",
- "reminder1_sent": 1234567890,
- "reminder2_sent": 1234567890,
- "reminder3_sent": 1234567890,
- "reminder_last_sent": 1234567890
}Handles the updating of a purchase order by id
| id required | string <string> Example: D2J234DFA The purchase order Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
Purchase order object that needs to be updated
| vendor_id required | string The hashed ID of the vendor |
| date required | string <date> Purchase order date |
| due_date required | string <date> Due date for the purchase order |
| private_notes | string Private notes for the purchase order |
| public_notes | string Public notes for the purchase order |
| custom_value1 | string Custom field value 1 |
| custom_value2 | string Custom field value 2 |
| custom_value3 | string Custom field value 3 |
| custom_value4 | string Custom field value 4 |
Array of objects Array of line items for the purchase order |
{- "vendor_id": "D2J234DFA",
- "date": "2024-01-01",
- "due_date": "2024-01-31",
- "private_notes": "Internal notes about this purchase order",
- "public_notes": "Please deliver to our warehouse",
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "line_items": [
- {
- "quantity": 10,
- "cost": 25,
- "product_key": "PROD_001",
- "notes": "Office supplies",
- "discount": 0,
- "is_amount_discount": true,
- "tax_name1": "Sales Tax",
- "tax_rate1": 8.5,
- "tax_name2": "",
- "tax_rate2": 0,
- "tax_name3": "",
- "tax_rate3": 0,
- "sort_id": "0",
- "custom_value1": "Department: IT",
- "custom_value2": "Priority: High",
- "custom_value3": "Approved by Manager",
- "custom_value4": "Budget Code: IT-2024",
- "type_id": "1",
- "tax_id": "1"
}
]
}{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "vendor_id": "",
- "status_id": "",
- "number": "PO_101",
- "quote_number": "QUOTE_101",
- "terms": "These are some purchase order terms. Valid for 14 days.",
- "public_notes": "These are public notes which the vendor may see",
- "private_notes": "These are private notes, not to be disclosed to the vendor",
- "footer": "The text goes in the footer of the purchase order",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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",
- "address1": "Suite 888",
- "address2": "5 Jimbo Way",
- "city": "Sydney",
- "state": "Florida",
- "postal_code": "90210",
- "phone": "555-213-3948",
- "country_id": "1",
- "vat_number": "32 120 377 720",
- "page_size": "A4",
- "font_size": 9,
- "primary_font": "roboto",
- "secondary_font": "roboto",
- "hide_paid_to_date": false,
- "embed_documents": false,
- "all_pages_header": false,
- "all_pages_footer": false,
- "document_email_attachment": false,
- "enable_client_portal_password": false,
- "enable_email_markup": false,
- "enable_client_portal_dashboard": false,
- "enable_client_portal": false,
- "email_template_statement": "template matter",
- "email_subject_statement": "subject matter",
- "signature_on_pdf": false,
- "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>",
- "enable_reminder1": false,
- "enable_reminder2": false,
- "enable_reminder3": false,
- "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",
- "client_online_payment_notification": false,
- "client_manual_payment_notification": false,
- "enable_e_invoice": false,
- "default_expense_payment_type_id": "0",
- "e_invoice_type": "EN16931",
- "mailgun_endpoint": "api.mailgun.net",
- "client_initiated_payments": false,
- "client_initiated_payments_minimum": 10,
- "sync_invoice_quote_columns": false,
- "show_task_item_description": false,
- "allow_billable_task_items": false,
- "accept_client_input_quote_approval": false,
- "show_paid_stamp": false,
- "show_shipping_address": false,
- "company_logo_size": 100,
- "show_email_footer": false,
- "email_alignment": "left",
- "auto_bill_standard_invoices": false,
- "postmark_secret": "123456",
- "mailgun_secret": "123456",
- "mailgun_domain": "sandbox123456.mailgun.org",
- "send_email_on_mark_paid": false,
- "vendor_portal_enable_uploads": false,
- "besr_id": "123456",
- "qr_iban": "CH123456",
- "email_subject_purchase_order": "Purchase Order",
- "email_template_purchase_order": "Please see attached your purchase order.",
- "require_purchase_order_signature": false,
- "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",
- "page_numbering": false,
- "auto_archive_invoice_cancelled": false,
- "email_from_name": "Bob Smith",
- "show_all_tasks_client_portal": "all",
- "entity_send_time": 9,
- "shared_invoice_credit_counter": false,
- "reply_to_name": "Bob Smith",
- "hide_empty_columns_on_pdf": false,
- "enable_reminder_endless": false,
- "use_credits_payment": false,
- "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",
- "client_portal_allow_under_payment": false,
- "client_portal_allow_over_payment": false,
- "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.",
- "client_can_register": false,
- "portal_design_id": "hd677df",
- "late_fee_endless_percent": 10,
- "late_fee_endless_amount": 10,
- "auto_email_invoice": false,
- "email_signature": "Bob Smith",
- "classification": "individual",
- "valid_until": "30 days",
- "credit_terms": "Credit note terms",
- "credit_footer": "Credit note footer"
}, - "last_viewed": 1434342123,
- "updated_at": 1434342123,
- "archived_at": 1434342123,
- "custom_surcharge1": 10,
- "custom_surcharge2": 10,
- "custom_surcharge3": 10,
- "custom_surcharge4": 10,
- "custom_surcharge_tax1": true,
- "custom_surcharge_tax2": true,
- "custom_surcharge_tax3": true,
- "custom_surcharge_tax4": true,
- "backup": "backup_data.json",
- "client_id": "Opnel5aKBz",
- "currency_id": "1",
- "design_id": "Opnel5aKBz",
- "exchange_rate": 1,
- "invoice_id": "Opnel5aKBz",
- "location_id": "Opnel5aKBz",
- "po_number": "PO-2024-001",
- "project_id": "Opnel5aKBz",
- "recurring_id": "Opnel5aKBz",
- "reminder1_sent": 1234567890,
- "reminder2_sent": 1234567890,
- "reminder3_sent": 1234567890,
- "reminder_last_sent": 1234567890
}Handles the deletion of an purchase orders by id
| id required | string <string> Example: D2J234DFA The purhcase order Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "message": "These credentials do not match our records / Invalid Token"
}Displays an purchase order by id
| id required | string <string> Example: D2J234DFA The purchase order Hashed ID |
| include | string Example: include=first_load Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes |
| X-API-TOKEN required | string Example: TOKEN The API token to be used for authentication |
| X-Requested-With required | string Example: XMLHttpRequest Used to send the XMLHttpRequest header |
{- "id": "Opnel5aKBz",
- "user_id": "",
- "assigned_user_id": "",
- "vendor_id": "",
- "status_id": "",
- "number": "PO_101",
- "quote_number": "QUOTE_101",
- "terms": "These are some purchase order terms. Valid for 14 days.",
- "public_notes": "These are public notes which the vendor may see",
- "private_notes": "These are private notes, not to be disclosed to the vendor",
- "footer": "The text goes in the footer of the purchase order",
- "custom_value1": "A custom value",
- "custom_value2": "A custom value",
- "custom_value3": "A custom value",
- "custom_value4": "A custom value",
- "tax_name1": "GST",
- "tax_name2": "VAT",
- "tax_rate1": 10,
- "tax_rate2": 10,
- "tax_name3": "",
- "tax_rate3": 10,
- "total_taxes": 10,
- "line_items": [
- {
- "quantity": 1,
- "cost": 10,
- "product_key": "Product key",
- "product_cost": 10,
- "notes": "Item notes",
- "discount": 5,
- "is_amount_discount": false,
- "tax_name1": "GST",
- "tax_rate1": 10,
- "tax_name2": "VAT",
- "tax_rate2": 5,
- "tax_name3": "CA Sales Tax",
- "tax_rate3": 3,
- "sort_id": "0",
- "line_total": 10,
- "gross_line_total": 15,
- "tax_amount": 1,
- "custom_value1": "Custom value 1",
- "custom_value2": "Custom value 2",
- "custom_value3": "Custom value 3",
- "custom_value4": "Custom value 4",
- "type_id": "1",
- "tax_id": "1"
}
], - "amount": 10,
- "balance": 10,
- "paid_to_date": 10,
- "discount": 10,
- "partial": 10,
- "is_amount_discount": true,
- "is_deleted": false,
- "uses_inclusive_taxes": true,
- "date": "1994-07-30",
- "last_sent_date": "1994-07-30",
- "next_send_date": "1994-07-30",
- "partial_due_date": "1994-07-30",
- "due_date": "1994-07-30",
- "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",
- "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"