Cmdlets for Xero

Build 25.0.9434

ExpenseClaims

Used for querying, inserting, and updating expense claims. Expense claims are submitted by employees or contractors for reimbursement of business-related expenses.

Table Specific Information

The ExpenseClaims table allows you to SELECT, INSERT, and UPDATE expense claims for a Xero organization.

SELECT

The Xero API allows extensive filtering and ordering. You can define WHERE and ORDER BY clauses in a query to filter and order the results using any non-line-item column.

Note: The Xero API does not support filtering on line items or journal lines.

INSERT

To create a new expense claim record, the UserId field must be defined; in addition, at least one ReceiptId must be specified. One can be provided either via the ReceiptId column:

INSERT INTO ExpenseClaims (UserId, ReceiptId) VALUES (
  'XXXXX-XXXXX-XXXXX-XXXXX', 'YYYYY-YYYYY-YYYYY-YYYYY'
)

Multiple may also be specified by including them in the ReceiptAggregate:

INSERT INTO ExpenseClaims (UserId, ReceiptAggregate) VALUES (
  'XXXXX-XXXXX-XXXXX-XXXXX',
  '<Receipt>
	<ReceiptID>YYYYY-YYYYY-YYYYY-YYYYY</ReceiptID>
  </Receipt>
  <Receipt>
	<ReceiptID>ZZZZZ-ZZZZZ-ZZZZZ-ZZZZZ</ReceiptID>
  </Receipt>'
)

UPDATE

You can update any field that is not read-only.

Note: UPDATE operations will count as two operations against the Xero API. One is required to retrieve the existing record, and another to update the record with new data.

Columns

Name Type ReadOnly Description
ExpenseClaimId [KEY] String True

The unique identifier assigned to the expense claim. This ID is used to link all receipts and related payments to a specific claim, ensuring the claim can be tracked and processed properly.

UserId String False

The unique identifier of the user associated with the expense claim. This field links the claim to the employee or individual who submitted it, allowing for proper tracking of user-related expenses.

ReceiptAggregate String False

Used to define multiple Receipt rows using XML values. This field is only applicable during an 'INSERT' operation to create new receipt records for the expense claim. It helps bundle multiple receipts under one claim.

ReceiptId String False

The unique identifier for the receipt associated with the expense claim. This ID helps link individual receipts to the overall expense claim, ensuring that each receipt can be tracked independently.

Status String True

The status of the expense claim. Valid values are 'SUBMITTED' (the claim is submitted but not yet processed), 'AUTHORISED' (the claim has been approved for payment), and 'PAID' (the claim has been paid).

UpdatedDateUTC Datetime True

The timestamp, in UTC, indicating when the expense claim was last updated. This date helps track the most recent changes made to the claim, whether it's a status update or a modification to the claim's details.

Total Decimal True

The total amount of the expense claim, representing the sum of all receipts submitted under the claim. This value is used to calculate the overall cost of the claim.

AmountDue Decimal True

The amount that is due to be paid for the expense claim. This is typically the total amount minus any previous payments already made or allocated to the claim.

AmountPaid Decimal True

The amount of the expense claim that has already been paid. This value is subtracted from the 'AmountDue' to determine what is still outstanding.

PaymentDueDate Date True

The date by which the expense claim must be paid. This is typically based on the organization's payment terms or the date the claim is approved.

ReportingDate Date True

The date on which the expense claim will be reported in Xero, typically used for financial reporting or accounting purposes to determine which period the claim falls into.

TenantId String False

The unique identifier of the tenant. This is used to access data specific to a particular tenant, ensuring that queries or operations are performed within the correct organizational context in a multi-tenant environment.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434