AgedPayablesByContact
Provides a way to query aged payables for a specific contact. It shows outstanding amounts owed by the organization to its contacts, broken down by aging periods (for example, 30, 60, or 90 days).
Table-Specific Information
SELECT
If the ContactId is not provided, the Aged Payables report for all contacts will be returned, one after the other. Please note that this will generate one operation against the Xero API per contact in the organization. Consider filtering to a subset of contacts or adding a LIMIT clause to avoid exceeding API limits. See Xero API Limits for more information.
Columns
| Name | Type | Description |
| ID [KEY] | String | A unique identifier for the row, combining the row number with the contact's unique ID, used to reference this specific entry. |
| ContactId | String | The unique identifier of the contact for which this bill or transaction is being reported. |
| Date | Datetime | The date when the bill was created. This timestamp marks when the bill was generated in the system. |
| Reference | String | A reference number for the purchase order associated with the bill, helping to link the bill to the corresponding order. |
| DueDate | Datetime | The date by which the amount on the bill is due for payment. This defines the deadline for the transaction. |
| Overdue | Decimal | The amount that is due after the due date has passed, reflecting the unpaid balance that is now overdue. |
| Currency | String | The currency used for all amounts in this entry, except for 'DueLocal', or empty if the default currency is being used for the organization. |
| Total | Decimal | The total amount due, including all charges or fees, calculated based on the items and any other applicable charges. |
| Paid | Decimal | The amount that has already been paid toward the bill, reflecting payments made up to the current point. |
| Credited | Decimal | The amount credited back, possibly due to refunds or adjustments, reducing the overall amount owed. |
| Due | Decimal | The remaining amount still owed, typically equal to 'Total' minus 'Paid' and 'Credited'. |
| DueLocal | Decimal | The amount still owed in the default organization currency, useful for organizations dealing with multiple currencies. |
| InvoiceId | String | The unique identifier of the invoice related to this bill, connecting the bill to the original invoice record. |
| TenantId | String | The unique identifier of the tenant to query for this particular operation, allowing access to data from a different tenant than the default connection. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| fromDate | Datetime | Shows all payable invoices from the specified date for the contact, used to filter results starting from a given date. |
| toDate | Datetime | Shows all payable invoices up to the specified date for the contact, used to filter results ending at a given date. |