Purchase Orders

Custom purchase order actions

Changed on

Performs a custom action on an purchase order. * * The current range of actions are as follows * - mark_paid * - download * - archive * - delete * - email

get/api/v1/purchase_orders/{id}/{action}

Request

Path parameters

idstring string required

The Purchase Order Hashed ID

actionstring string required

The action string to be performed

Query parameters

includestring
Example:first_load

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

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Response

Returns the purchase order object

idstring

The unique hashed identifier for the purchase order

user_idstring

The unique hashed identifier for the user who created the purchase order

assigned_user_idstring

The unique hashed identifier for the user assigned to the purchase order

vendor_idstring

The unique hashed identifier for the vendor associated with the purchase order

status_idstring

The status of the purchase order represented by a unique identifier

numberstring

The unique alpha-numeric purchase order number per company

quote_numberstring

The quote number associated with this purchase order

termsstring

The terms and conditions for the purchase order

public_notesstring

Publicly visible notes associated with the purchase order

private_notesstring

Privately visible notes associated with the purchase order, not disclosed to the vendor

footerstring

The footer text of the purchase order

custom_value1string

First custom value field for additional information

custom_value2string

Second custom value field for additional information

custom_value3string

Third custom value field for additional information

custom_value4string

Fourth custom value field for additional information

tax_name1string

The name of the first tax applied to the purchase order

tax_name2string

The name of the second tax applied to the purchase order

tax_rate1number float

The rate of the first tax applied to the purchase order

tax_rate2number float

The rate of the second tax applied to the purchase order

tax_name3string

The name of the third tax applied to the purchase order

tax_rate3number float

The rate of the third tax applied to the purchase order

total_taxesnumber float

The total amount of taxes applied to the purchase order

amountnumber float

The total amount of the purchase order before taxes and discounts

balancenumber float

The balance due for the purchase order after accounting for payments

paid_to_datenumber float

The total amount paid on the purchase order so far

discountnumber float

The discount amount or percentage applied to the purchase order

partialnumber float

The partial or deposit amount for the purchase order

is_amount_discountboolean

Boolean flag indicating if the discount is a fixed amount or a percentage

is_deletedboolean

Boolean flag indicating if the purchase order has been deleted

uses_inclusive_taxesboolean

Boolean flag indicating if the taxes used are inclusive or exclusive

datestring date

The date the purchase order was created

last_sent_datestring date

The last date the purchase order was sent to the vendor

next_send_datestring date

The next scheduled date for sending a reminder for the purchase order

partial_due_datestring date

The due date for the partial or deposit amount

due_datestring date

The due date for the total amount of the purchase order

last_viewednumber

Timestamp

updated_atnumber

Timestamp

archived_atnumber

Timestamp

custom_surcharge1number float

First custom surcharge amount for the purchase order

custom_surcharge2number float

Second custom surcharge amount for the purchase order

custom_surcharge3number float

Third custom surcharge amount for the purchase order

custom_surcharge4number float

Fourth custom surcharge amount for the purchase order

custom_surcharge_tax1boolean

Boolean flag indicating if taxes are charged on the first custom surcharge amount

custom_surcharge_tax2boolean

Boolean flag indicating if taxes are charged on the second custom surcharge amount

custom_surcharge_tax3boolean

Boolean flag indicating if taxes are charged on the third custom surcharge amount

custom_surcharge_tax4boolean

Boolean flag indicating if taxes are charged on the fourth custom surcharge amount

backupstring

Backup data or file reference for this purchase order

client_idstring

The unique identifier of the client associated with this purchase order

currency_idstring

The unique identifier of the currency

design_idstring

The unique identifier of the design template used for this purchase order

exchange_ratenumber float

The exchange rate used for currency conversion

invoice_idstring

The unique identifier of the related invoice

quote_idstring

The unique identifier of the related quote

location_idstring

The unique identifier of the location

po_numberstring

The purchase order number

project_idstring

The unique identifier of the project associated with this purchase order

recurring_idstring

The unique identifier of the recurring schedule

reminder1_sentnumber

Timestamp when the first reminder was sent

reminder2_sentnumber

Timestamp when the second reminder was sent

reminder3_sentnumber

Timestamp when the third reminder was sent

reminder_last_sentnumber

Timestamp when the last reminder was sent

Example response

{
  "id": "Opnel5aKBz",
  "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_rate3": 10,
  "total_taxes": 10,
  "line_items": [
    {
      "quantity": 1,
      "cost": 10,
      "product_key": "Product key",
      "tags": "Retail,Priority Customer",
      "product_cost": 10,
      "notes": "Item notes",
      "discount": 5,
      "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,
  "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",
    "reply_to_email": "email@gmail.com",
    "bcc_email": "email@gmail.com, contact@gmail.com",
    "pdf_email_attachment": true,
    "ubl_email_attachment": true,
    "email_style_custom": "<HTML></HTML>",
    "counter_number_applied": "when_sent",
    "quote_number_applied": "when_sent",
    "custom_message_dashboard": "Please pay invoices immediately",
    "custom_message_unpaid_invoice": "Please pay invoices immediately",
    "custom_message_paid_invoice": "Thanks for paying this invoice!",
    "custom_message_unapproved_quote": "Please approve quote",
    "lock_invoices": "off",
    "auto_archive_invoice": true,
    "auto_archive_quote": true,
    "auto_convert_quote": true,
    "inclusive_taxes": true,
    "translations": {},
    "task_number_pattern": "{$year}-{$counter}",
    "task_number_counter": 1,
    "reminder_send_time": 32400,
    "expense_number_pattern": "{$year}-{$counter}",
    "expense_number_counter": 1,
    "vendor_number_pattern": "{$year}-{$counter}",
    "vendor_number_counter": 1,
    "ticket_number_pattern": "{$year}-{$counter}",
    "ticket_number_counter": 1,
    "payment_number_pattern": "{$year}-{$counter}",
    "payment_number_counter": 1,
    "invoice_number_pattern": "{$year}-{$counter}",
    "invoice_number_counter": 1,
    "quote_number_pattern": "{$year}-{$counter}",
    "quote_number_counter": 1,
    "client_number_pattern": "{$year}-{$counter}",
    "client_number_counter": 1,
    "credit_number_pattern": "{$year}-{$counter}",
    "credit_number_counter": 1,
    "recurring_invoice_number_prefix": "R",
    "reset_counter_frequency_id": 1,
    "reset_counter_date": "2019-01-01",
    "counter_padding": 1,
    "shared_invoice_quote_counter": true,
    "update_products": true,
    "convert_products": true,
    "fill_products": true,
    "invoice_terms": "Invoice Terms are...",
    "quote_terms": "Quote Terms are...",
    "invoice_taxes": 1,
    "invoice_design_id": "1",
    "quote_design_id": "1",
    "invoice_footer": "1",
    "invoice_labels": "1",
    "tax_rate1": 10,
    "tax_name1": "GST",
    "tax_rate2": 10,
    "tax_name2": "GST",
    "tax_rate3": 10,
    "tax_name3": "GST",
    "payment_type_id": "1",
    "custom_fields": "{}",
    "email_footer": "A default email footer",
    "email_sending_method": "default",
    "gmail_sending_user_id": "F76sd34D",
    "email_subject_invoice": "Your Invoice Subject",
    "email_subject_quote": "Your Quote Subject",
    "email_subject_payment": "Your Payment Subject",
    "email_template_invoice": "<HTML></HTML>",
    "email_template_quote": "<HTML></HTML>",
    "email_template_payment": "<HTML></HTML>",
    "email_subject_reminder1": "<HTML></HTML>",
    "email_subject_reminder2": "<HTML></HTML>",
    "email_subject_reminder3": "<HTML></HTML>",
    "email_subject_reminder_endless": "<HTML></HTML>",
    "email_template_reminder1": "<HTML></HTML>",
    "email_template_reminder2": "<HTML></HTML>",
    "email_template_reminder3": "<HTML></HTML>",
    "email_template_reminder_endless": "<HTML></HTML>",
    "enable_portal_password": true,
    "show_accept_invoice_terms": true,
    "show_accept_quote_terms": true,
    "require_invoice_signature": true,
    "require_quote_signature": true,
    "name": "Acme Co",
    "company_logo": "logo.png",
    "website": "https://www.acme.com",
    "address1": "Suite 888",
    "address2": "5 Jimbo Way",
    "city": "Sydney",
    "state": "Florida",
    "postal_code": "90210",
    "phone": "555-213-3948",
    "email": "joe@acme.co",
    "country_id": "1",
    "vat_number": "32 120 377 720",
    "page_size": "A4",
    "font_size": 9,
    "primary_font": "roboto",
    "secondary_font": "roboto",
    "email_template_statement": "template matter",
    "email_subject_statement": "subject matter",
    "quote_footer": "the quote footer",
    "email_subject_custom1": "Custom Subject 1",
    "email_subject_custom2": "Custom Subject 2",
    "email_subject_custom3": "Custom Subject 3",
    "email_template_custom1": "<HTML></HTML>",
    "email_template_custom2": "<HTML></HTML>",
    "email_template_custom3": "<HTML></HTML>",
    "num_days_reminder1": 9,
    "num_days_reminder2": 9,
    "num_days_reminder3": 9,
    "schedule_reminder1": "after_invoice_date",
    "schedule_reminder2": "after_invoice_date",
    "schedule_reminder3": "after_invoice_date",
    "late_fee_amount1": 10,
    "late_fee_amount2": 20,
    "late_fee_amount3": 100,
    "endless_reminder_frequency_id": "1",
    "default_expense_payment_type_id": "0",
    "e_invoice_type": "EN16931",
    "mailgun_endpoint": "api.mailgun.net",
    "client_initiated_payments_minimum": 10,
    "custom_sending_email": "bob@gmail.com",
    "company_logo_size": 100,
    "email_alignment": "left",
    "postmark_secret": "123456",
    "mailgun_secret": "123456",
    "mailgun_domain": "sandbox123456.mailgun.org",
    "besr_id": "123456",
    "qr_iban": "CH123456",
    "email_subject_purchase_order": "Purchase Order",
    "email_template_purchase_order": "Please see attached your purchase order.",
    "purchase_order_public_notes": "Please see attached your purchase order.",
    "purchase_order_terms": "Please see attached your purchase order.",
    "purchase_order_footer": "Please see attached your purchase order.",
    "purchase_order_design_id": "hd677df",
    "purchase_order_number_pattern": "PO-000000",
    "purchase_order_number_counter": 1,
    "page_numbering_alignment": "left",
    "email_from_name": "Bob Smith",
    "show_all_tasks_client_portal": "all",
    "entity_send_time": 9,
    "reply_to_name": "Bob Smith",
    "recurring_invoice_number_pattern": "R-000000",
    "recurring_invoice_number_counter": 1,
    "client_portal_under_payment_minimum": 10,
    "auto_bill_date": "on_send_date",
    "primary_color": "#ffffff",
    "secondary_color": "#ffffff",
    "auto_bill": "off",
    "client_portal_terms": "Please see attached your invoice.",
    "client_portal_privacy_policy": "These are the terms of use for using the client portal.",
    "portal_design_id": "hd677df",
    "late_fee_endless_percent": 10,
    "late_fee_endless_amount": 10,
    "email_signature": "Bob Smith",
    "classification": "individual",
    "valid_until": "30 days",
    "credit_terms": "Credit note terms",
    "credit_footer": "Credit note footer"
  },
  "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",
  "quote_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
}

Changes