Skip to content
Proud to collaborate with Microsoft for Startups

xero.invoices.get-invoices ​

Retrieves sales invoices or purchase bills

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-xero
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Xero API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
xero_tenant_idstringYes—Xero identifier for Tenant
if_modified_sincestringNo—Only records created or modified since this timestamp will be returned
wherestringNo—Filter by an any element
orderstringNo—Order by an any element
idslistNo—Filter by a comma-separated list of InvoicesIDs.
invoicenumberslistNo—Filter by a comma-separated list of InvoiceNumbers.
contactidslistNo—Filter by a comma-separated list of ContactIDs.
statuseslistNo—Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter.
pageintegerNo—e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice
includearchivedbooleanNo—e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
createdbymyappbooleanNo—When set to true you'll only retrieve Invoices created by your app
unitdpintegerNo—e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
summaryonlybooleanNo—Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
pagesizeintegerNo—Number of records to retrieve per page
searchtermstringNo—Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Xero API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
xero_tenant_idstringYes—Xero identifier for Tenant
if_modified_sincestringNo—Only records created or modified since this timestamp will be returned
wherestringNo—Filter by an any element
orderstringNo—Order by an any element
idslistNo—Filter by a comma-separated list of InvoicesIDs.
invoicenumberslistNo—Filter by a comma-separated list of InvoiceNumbers.
contactidslistNo—Filter by a comma-separated list of ContactIDs.
statuseslistNo—Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter.
pageintegerNo—e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice
includearchivedbooleanNo—e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
createdbymyappbooleanNo—When set to true you'll only retrieve Invoices created by your app
unitdpintegerNo—e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
summaryonlybooleanNo—Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
pagesizeintegerNo—Number of records to retrieve per page
searchtermstringNo—Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call GET /Invoices
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform GET /Invoices
* (any state)failfailedRecord the failure reason

Outcomes ​

OutcomeTypeDescriptionState Data Keys
completedSUCCESSThe provider accepted the requeststatus_code, response
failedFAILUREThe provider rejected the request or was unreachablefailure_reason, failure_type, status_code

Business Errors ​

CodeMessage Template
HTTP_AUTHENTICATION_FAILEDThe provider rejected the credential (HTTP {status_code})
HTTP_AUTHORIZATION_FAILEDThe credential is not permitted to perform this operation (HTTP {status_code})
HTTP_NOT_FOUNDThe provider has no resource at {path} (HTTP 404)
HTTP_RATE_LIMITEDThe provider rate-limited this request (HTTP 429)
HTTP_REQUEST_FAILEDThe provider returned HTTP {status_code} for {method}
HTTP_RESPONSE_SHAPE_UNEXPECTEDThe provider response for {method} {path} could not be parsed as JSON

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "xero.invoices.get-invoices",
  "initial_data": {
    "base_url": "value",
    "xero_tenant_id": "value"
  }
}