Journals


Overview

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

GET Journals

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. Optional parameters
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.

Response elements returned for GET Journals

JournalIDXero identifier
JournalDateDate the journal was posted
JournalNumberXero generated journal number
CreatedDateUTCCreated date UTC format
Reference 
SourceIDThe identifier for the source transaction (e.g. InvoiceID)
SourceTypeThe journal source type. The type of transaction that created the journal
JournalLinesSee JournalLines
Note: SourceID and SourceType will not be returned when calling an individual journal by JournalID or JournalNumber.

Elements for Journal Lines

JournalLineIDXero identifier
AccountIDSee Accounts
AccountCodeSee Accounts
AccountTypeSee Account Types
AccountNameSee AccountCodes
DescriptionThe description from the source transaction line item. Only returned if populated.
NetAmountNet amount of journal line. This will be a positive value for a debit and negative for a credit
GrossAmountGross amount of journal line (NetAmount + TaxAmount).
TaxAmountTotal tax on a journal line
TaxTypesee TaxTypes
TaxNamesee TaxRates
TrackingCategoriessee Tracking

An example of GET Journals

<Journals>
    <Journal>
      <JournalID>0d926df3-459f-4264-a3a3-49ac065eb0ed</JournalID>
      <JournalDate>2010-06-29T00:00:00</JournalDate>
      <JournalNumber>388</JournalNumber>
      <CreatedDateUTC>2010-09-16T23:00:33.613</CreatedDateUTC>
      <Reference>Web</Reference>
      <JournalLines>
        <JournalLine>
          <JournalLineID>8f99fb82-46b6-496d-864e-f8e0bc3e2922</JournalLineID>
          <AccountID>5040915e-8ce7-4177-8d08-fde416232f18</AccountID>
          <AccountCode>1100</AccountCode>
          <AccountType>REVENUE</AccountType>
          <AccountName>Sales</AccountName>
          <NetAmount>-300.00</NetAmount>
          <GrossAmount>-337.50</GrossAmount>
          <TaxAmount>-37.50</TaxAmount>
          <TaxType>OUTPUT</TaxType>
          <TaxName>12.5% GST on Income</TaxName>
          <TrackingCategories>
            <TrackingCategory>
              <Name>Region</Name>
              <Option>Central</Option>
              <TrackingCategoryID>e2f2f732-e92a-4f3a-9c4d-ee4da0182a13</TrackingCategoryID>
              <TrackingOptionID>dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa</TrackingOptionID>
            </TrackingCategory>
          </TrackingCategories>
        </JournalLine>
        <JournalLine>
          <JournalLineID>45db4370-3eed-4394-93bb-e83f1d54691d</JournalLineID>
          <AccountID>9fef6d9d-4bce-4bcc-8679-f50e5ebd12e5</AccountID>
          <AccountCode>820</AccountCode>
          <AccountType>CURRLIAB</AccountType>
          <AccountName>GST</AccountName>
          <NetAmount>-37.50</NetAmount>
          <GrossAmount>-37.50</GrossAmount>
          <TaxAmount>0.00</TaxAmount>
          <TrackingCategories>
            <TrackingCategory>
              <Name>Region</Name>
              <Option>Central</Option>
              <TrackingCategoryID>e2f2f732-e92a-4f3a-9c4d-ee4da0182a13</TrackingCategoryID>
              <TrackingOptionID>dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa</TrackingOptionID>
            </TrackingCategory>
          </TrackingCategories>
        </JournalLine>
        <JournalLine>
          <JournalLineID>0696bb65-d23c-4bc7-b693-71c30b448dc9</JournalLineID>
          <AccountID>240c0528-24ef-42f6-82ed-dab806c79440</AccountID>
          <AccountCode>610</AccountCode>
          <AccountType>CURRENT</AccountType>
          <AccountName>Accounts Receivable</AccountName>
          <NetAmount>337.50</NetAmount>
          <GrossAmount>337.50</GrossAmount>
          <TaxAmount>0.00</TaxAmount>
          <TrackingCategories>
            <TrackingCategory>
              <Name>Region</Name>
              <Option>Central</Option>
              <TrackingCategoryID>e2f2f732-e92a-4f3a-9c4d-ee4da0182a13</TrackingCategoryID>
              <TrackingOptionID>dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa</TrackingOptionID>
            </TrackingCategory>
          </TrackingCategories>
        </JournalLine>
      </JournalLines>
    </Journal>
…...
</Journals>