Quotes
The billing_table object
A billing document laid out as a table: its lines with their discount, tax and total, and the document's totals. GET /quotes/{id}/table returns a quote's. Amounts are in the currency's smallest unit (for example 49900 = 499.00 THB).
Attributes
objectstringRequiredThe type of document the table was built from:
quotefor a quote's table.numberstringRequiredThe document's number.
currencystringRequiredThree-letter ISO 4217 currency code of the document, in lowercase.
scaling_factorintegerRequiredNumber of smallest units in one unit of the currency, for example
100for THB. Divide an amount by it to get major units.statusstringRequiredThe document's status, as the document itself shows it.
line_itemsarray of objectsRequiredThe document's lines, in order.
Show child attributes
line_items.descriptionstringRequiredThe line's product name, else its description.
line_items.quantityintegerRequiredNumber of units.
line_items.unit_amountintegerRequiredPrice of one unit.
line_items.subtotalintegerRequiredThe line's amount before discount and tax.
line_items.discount_amountintegerRequiredDiscount on the line.
line_items.tax_amountintegerRequiredTax on the line.
line_items.totalintegerRequiredThe line's total:
subtotallessdiscount_amount, plus any tax added on top of the price.line_items.taxesarray of objectsRequiredThe line's taxes, one entry per tax, named after its tax rate.
Show child attributes
line_items.taxes.display_namestringRequiredThe tax's name; empty when the document does not record it.
line_items.taxes.percentagenumberRequiredThe tax rate, in percent;
0when the document does not record it.line_items.taxes.amountintegerRequiredAmount of the tax.
line_items.taxes.inclusivebooleanRequiredtruewhen the tax is already included in the price;falsewhen it is added on top of it.
summaryobjectRequiredThe document's totals.
Show child attributes
summary.subtotalintegerRequiredThe document's subtotal, before discount and before tax added on top of the price.
summary.total_discountintegerRequiredSum of the document's discounts.
summary.total_taxintegerRequiredSum of
taxes.summary.total_feeintegerRequiredSum of
fees.summary.shippingintegerRequiredsummary.totalintegerRequiredThe document's total.
summary.taxesarray of objectsRequiredThe lines' taxes summed by name, rate and whether they are included in the price, in the order first seen.
Show child attributes
summary.taxes.display_namestringRequiredThe tax's name; empty when the document does not record it.
summary.taxes.percentagenumberRequiredThe tax rate, in percent;
0when the document does not record it.summary.taxes.amountintegerRequiredAmount of the tax.
summary.taxes.inclusivebooleanRequiredtruewhen the tax is already included in the price;falsewhen it is added on top of it.
summary.feesarray of objectsRequiredThe document's fees.
Show child attributes
summary.fees.display_namestringRequiredThe fee's name.
summary.fees.amountintegerRequiredThe fee's amount:
fixed_amountwhen set, elsepercentageof the document's base amount.summary.fees.percentagenumberNullableThe fee's rate, in percent; omitted for a fixed fee.
summary.fees.fixed_amountintegerNullableThe fee's fixed amount; omitted for a percentage fee.
summary.discountobjectRequiredNullableThe document's coupon discount: on a quote's table, the names of its discounts joined by commas and their total;
nullwhen there is none.Show child attributes
summary.discount.namestringRequiredThe coupon's name.
summary.discount.amountintegerRequiredAmount of the discount.
summary.discount.percentagenumberNullableThe coupon's percent off; omitted when it takes no percentage off.
summary.discount.fixed_amountintegerNullableThe coupon's amount off; omitted when it takes no fixed amount off.
summary.amount_creditedintegerRequiredFor an invoice, what its credit notes credited;
0on a quote's table.summary.amount_paidintegerRequiredFor an invoice, what has been paid on it;
0on a quote's table.summary.amount_remainingintegerRequiredFor an invoice, what is still due on it;
0on a quote's table.summary.amount_withholdingintegerRequiredThai withholding tax the customer deducts from the document;
0without one.summary.withholding_rateintegerRequiredThe withholding percent (1, 2, 3 or 5);
0without withholding.summary.credit_notesarray of objectsRequiredFor an invoice, the credit notes issued on it;
[]on a quote's table.Show child attributes
summary.credit_notes.idstringRequiredID of the credit note.
summary.credit_notes.numberstringRequiredThe credit note's number.
summary.credit_notes.amountintegerRequiredThe credit note's total.
summary.credit_notes.statusstringRequiredThe credit note's status.
summary.invoiceobjectNullableFor a credit note, the invoice it credits; omitted on a quote's table.
Show child attributes
summary.invoice.idstringRequiredID of the invoice.
summary.invoice.numberstringRequiredThe invoice's number.
summary.invoice.totalintegerRequiredamount_paid+amount_remaining+amount_credited.summary.invoice.amount_creditedintegerRequiredWhat the invoice's credit notes credited; canceled ones are left out.
summary.invoice.amount_paidintegerRequiredWhat has been paid on the invoice.
summary.invoice.amount_remainingintegerRequiredWhat is still due on the invoice.