URL | https://api.xero.com/api.xro/2.0/Journals |
Methods Supported | GET |
Description | Allows you to retrieve any journals.
See Manual Journals if you need to create journals in Xero |
Use this method to retrieve either one or many journals. A maximum of 100 journals will be returned in any response. Use the offset or If-Modified-Since filters (see below) with multiple API calls to retrieve larger sets of journals. Journals are ordered oldest to newest.
Response elements returned for GET Journals:
JournalID | Xero identifier |
JournalDate | Date the journal was posted |
JournalNumber | Xero generated journal number |
CreatedDateUTC | Created date UTC format |
Reference | |
SourceID | The identifier for the source transaction (e.g. InvoiceID). Note: not returned when calling an individual journal by JournalID or JournalNumber. |
SourceType | The journal source type. The type of transaction that created the journal. Note: not returned when calling an individual journal by JournalID or JournalNumber. |
JournalLines | See JournalLines |
Elements for Journal Lines | |
JournalLineID | Xero identifier |
AccountID | See Accounts |
AccountCode | See Accounts |
AccountType | See Account Types |
AccountName | See AccountCodes |
Description | The description from the source transaction line item. Only returned if populated. |
NetAmount | Net amount of journal line. This will be a positive value for a debit and negative for a credit |
GrossAmount | Gross amount of journal line (NetAmount + TaxAmount). |
TaxAmount | Total tax on a journal line |
TaxType | see TaxTypes |
TaxName | see TaxRates |
TrackingCategories | see Tracking |
Record filter | You can specify an individual journal by appending the value to the endpoint, i.e.
GET https://.../Journals/{identifier} |
JournalID - The Xero identifier for an Journal
e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 |
|
JournalNumber - The JournalNumber
e.g. 100 |
|
Modified After | The ModifiedAfter filter is actually an HTTP header: '
If-Modified-Since'.
A UTC timestamp (yyyy-MM-ddTHH:mm:ss) . Only journals created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00 |
offset | Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned. |
paymentsOnly | Set to true if you want to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. |
An example response for GET Journals
GET https://api.xero.com/api.xro/2.0/Journals