Use this endpoint to query invoices.
List invoices
GET: /wp-json/sab/v1/invoices/
Properties
Scope under which the request is made; determines fields present in response. Options: view
Current page of the collection. Default is 1
Maximum number of items to be returned in result set. Default is 10
Limit results to those matching a string.
Limit response to resources published after a given ISO8601 compliant date.
Limit response to resources published before a given ISO8601 compliant date.
Ensure result set excludes specific IDs.
Limit result set to specific ids.
Offset the result set by a specific number of items.
Order sort attribute ascending or descending. Options: desc
Sort collection by object attribute. Options: date
Limit result set to documents which have specific statuses. Default is any
Limit result set to documents which have a specific reference id.
Limit result set to documents which have a specific reference type.
Limit result set to invoices which have a specific payment statuses. Default is any
exclude properties
exclude item.
include properties
include item.
status properties
status item. Options:
payment_status properties
payment_status item. Options:
Example
This is an example request which retrieves invoices associated with a certain order.
curl https://example.com/wp-json/sab/v1/invoices/?reference_id=<order_id>
Manage invoices
Retrieve, update or delete an invoice.
GET|POST|PUT|PATCH|DELETE: /wp-json/sab/v1/invoices/<id>
Properties
Unique identifier for the resource.
Parent document ID.
The reference id linked to the document.
The reference type linked to the document.
The reference formatted number linked to the document.
The document number.
The formatted document number.
Shows where the document was created.
The current document status. Options: draft
The date the document was created, in the site’s timezone.
The date the document was created, as GMT.
The date the document was last modified, in the site’s timezone.
The date the document was last modified, as GMT.
The date the document was sent, in the site’s timezone.
The date the document was sent, as GMT.
User ID linked to the document. 0 for guests.
Author ID linked to the document.
Relative path to PDF file.
Absolute path to PDF file.
The journal type for numbering purposes.
The document version.
The document country.
Formatted address data.
Address data.
Attachments.
Meta data.
The order ID linked to the invoice.
The formatted order number linked to the invoice.
The order resource type, e.g. woocommerce. Default is woocommerce
Whether to automatically sync the invoice with it’s order if possible.
Invoice payment status. Options: pending
The payment method slug.
The payment method title.
The payment transaction id.
Currency the invoice was created with, in ISO format. Options: USD
The date the invoice was marked as paid, in the site’s timezone.
The date the invoice was marked as paid, as GMT.
The date until which the invoice is due for payment, in the site’s timezone.
The date until which the invoice is due for payment, as GMT.
The date of service, in the site’s timezone.
The date of service, as GMT.
The end date of service, in the site’s timezone.
The end date of service, as GMT.
Product total amount for the invoice.
Product subtotal (before discounts) amount for the invoice.
Shipping total amount for the invoice.
Shipping subtotal (before discounts) amount for the invoice.
Fee total amount for the invoice.
Fee subtotal (before discounts) amount for the invoice.
Discount total amount for the invoice.
Discount percentage for the invoice.
A notice on discounts e.g. coupon codes used.
Discount on additional costs e.g. shipping and fees.
Voucher total amount for the invoice.
Voucher net amount for the invoice.
Voucher tax amount for the invoice.
Tax total amount for the invoice.
Subtotal tax (before discounts) amount for the invoice.
Product tax total amount for the invoice.
Product subtotal tax (before discounts) amount for the invoice.
Shipping tax total amount for the invoice.
Shipping subtotal tax (before discounts) amount for the invoice.
Fee tax total amount for the invoice.
Fee subtotal tax (before discounts) amount for the invoice.
Discount tax total amount for the invoice.
Additional costs discount tax total amount for the invoice.
Total amount for the invoice.
Subtotal (before discounts) amount for the invoice.
Total net amount for the invoice.
Subtotal net amount for the invoice.
Product net amount for the invoice.
Product subtotal net amount for the invoice.
Shipping net amount for the invoice.
Shipping subtotal net amount for the invoice.
Fee net amount for the invoice.
Fee subtotal net amount for the invoice.
Total paid amount of the invoice.
Tax rate percentages.
True in case prices include tax.
VAT ID.
Is a reverse of charge?
Is a vat exempt?
Is a OSS invoice?
Is taxable in EU?
Is a b2b transaction?
Is a EU intra-community supply?
Is taxable in a EU VAT country?
Is taxable in a third country?
Is taxable?
Round tax at subtotal?
Formatted shipping address data.
Shipping Address data.
Taxable country code in ISO 3166-1 alpha-2 format.
Taxable postcode.
Taxable company.
Product items data.
Tax items.
Shipping items.
Fee lines data.
Voucher items.
Total data.
Tax total data.
address properties
First name.
Last name.
Company name.
Address line 1.
Address line 2.
City name.
ISO code or name of the state, province or district.
Postal code.
Country code in ISO 3166-1 alpha-2 format.
Email address.
Phone number.
Address VAT ID.
attachments properties
Unique identifier for the resource.
The attachment type, e.g. einvoice.
The attachment name.
The attachment title.
The attachment file extension.
The date the attachment was created, in the site’s timezone.
The date the attachment was created, as GMT.
The attachment document id.
Relative path to attachment file.
Absolute path to attachment file.
The filename.
Meta data.
meta_data properties
Meta ID.
Meta key.
Meta value.
tax_rate_percentages properties
tax_rate_percentages item.
shipping_address properties
First name.
Last name.
Company name.
Address line 1.
Address line 2.
City name.
ISO code or name of the state, province or district.
Postal code.
Country code in ISO 3166-1 alpha-2 format.
Email address.
Phone number.
Address VAT ID.
product_items properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Whether the item is taxable or not.
Line subtotal (before discounts).
Discount total.
Discount net total.
Discount tax total.
Discount percentage.
Line subtotal tax (before discounts).
Line total (after discounts).
Line total tax (after discounts).
Product taxes.
Product price.
Product net price.
Product price tax.
Product price (before discounts).
Product price tax (before discounts).
Product net price (before discounts).
Product total.
Product net total.
Product subtotal.
Product net subtotal.
Product ID.
SKU.
Whether this is a virtual item.
Whether this item is a service or not.
Whether this item differential taxed or not.
attributes properties
Attribute value.
Attribute key.
Attribute label.
Attribute formatted label.
Attribute formatted value.
taxes properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Tax type e.g. product.
True in case tax is rounded at subtotal.
Is OSS tax?
Tax total.
Tax net total.
Tax subtotal.
Tax net subtotal.
tax_rate.
tax_rate properties
Tax percentage.
Formatted tax percentage.
Tax country.
Tax priority.
Is compound?
Is OSS?
Tax rate label.
tax_items properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Tax type e.g. product.
True in case tax is rounded at subtotal.
Is OSS tax?
Tax total.
Tax net total.
Tax subtotal.
Tax net subtotal.
tax_rate.
shipping_items properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Whether the item is taxable or not.
Line subtotal (before discounts).
Discount total.
Discount net total.
Discount tax total.
Discount percentage.
Line subtotal tax (before discounts).
Line total (after discounts).
Line total tax (after discounts).
Product taxes.
Product price.
Product net price.
Product price tax.
Product price (before discounts).
Product price tax (before discounts).
Product net price (before discounts).
Product total.
Product net total.
Product subtotal.
Product net subtotal.
Whether to enable split-tax calculation.
fee_items properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Whether the item is taxable or not.
Line subtotal (before discounts).
Discount total.
Discount net total.
Discount tax total.
Discount percentage.
Line subtotal tax (before discounts).
Line total (after discounts).
Line total tax (after discounts).
Product taxes.
Product price.
Product net price.
Product price tax.
Product price (before discounts).
Product price tax (before discounts).
Product net price (before discounts).
Product total.
Product net total.
Product subtotal.
Product net subtotal.
Whether to enable split-tax calculation.
voucher_items properties
Item ID.
Item reference ID.
Item parent ID.
Item name.
Item document ID.
Item Quantity.
Meta data.
Item attributes.
Coupon code.
Line total (after discounts).
Product price.
Product total.
totals properties
Total type.
Total amount.
Total formatted amount.
Total label.
Formatted label.
The total’s unit.
The total’s unit type, e.g. currency.
Total placeholders.
placeholders properties
tax_totals properties
Product tax total.
Shipping tax total.
Fee tax total.
net_totals properties
Product net total.
Shipping net total.
Fee net total.
Download PDF
Download the invoice PDF.
GET: /wp-json/sab/v1/invoices/<id>/pdf
Properties
The file data (base64 encoded).
Local path to file in case it exists.
The filename.
Whether it is a preview or the file is persisted.