Xero Accounting Endpoint: ProfitAndLossByMonth: Difference between revisions
No edit summary |
No edit summary |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Disclaimer == | |||
'''''The [[Xero Accounting Endpoint: ProfitAndLossMultiPeriodTable|ProfitAndLossMultiPeriodTable]] is the recommend endpoint for building Profit and Loss reports. We recommend using it over the ProfitAndLossByMonth endpoint.''''' | |||
== Overview == | == Overview == | ||
The Xero '''ProfitAndLossByMonth''' [[Endpoints|endpoint]] provides net movement values for 12-months of a given financial year. | The Xero '''ProfitAndLossByMonth''' [[Xero Accounting Endpoints|endpoint]] provides net movement values for 12-months of a given financial year. | ||
It is a [[Function Endpoints|function]] that accepts a series of parameters. | It is a [[Function Endpoints|function]] that accepts a series of parameters. | ||
| Line 38: | Line 43: | ||
;StandardLayout | ;StandardLayout | ||
:A [[Field Type: | :A [[Field Type: Boolean|true/false field]] that indicates if values are produced only for accounts that are in the [[Xero Accounting Endpoint: Accounts|accounts]] endpoint. | ||
:This will match the StandardLayout entered as [[#Parameters|parameter]]. | :This will match the StandardLayout entered as [[#Parameters|parameter]]. | ||
| Line 81: | Line 86: | ||
;Date | ;Date | ||
:A [[Field Type: Date|date | :A [[Field Type: Date|date field]] that provides the month as a date. | ||
;Amount | ;Amount | ||
:A [[Field Type: Decimal|decimal | :A [[Field Type: Decimal|decimal field]] that provides the value for the row. | ||
== Known Issue == | == Known Issue == | ||
There is a known bug in the Xero API which incorrectly calculates values if your financial year ends in a month without 31 days. | There is a known bug in the Xero API which incorrectly calculates values if your financial year ends in a month without 31 days (e.g. Australian Businesses). To work around this issue, OdataLink will call the endpoint twice for affected businesses. This does not apply to all regions. For instance, New Zealand data files are mostly unaffected as their financial year already ends on a month with 31 days. | ||
To work around this issue, OdataLink will | |||
This does not apply to all regions. For instance, New Zealand data files are mostly unaffected as their financial year already ends on a month with 31 days. | |||
== Xero API == | == Xero API == | ||
| Line 112: | Line 110: | ||
:[[Xero Accounting Endpoint: Accounts|Accounts]] | :[[Xero Accounting Endpoint: Accounts|Accounts]] | ||
:[[Xero Accounting Endpoint: ProfitAndLoss|ProfitAndLoss]] | :[[Xero Accounting Endpoint: ProfitAndLoss|ProfitAndLoss]] | ||
:[[Xero Accounting Endpoint: ProfitAndLossAdvanced|ProfitAndLossAdvanced]] | |||
:[[Xero Accounting Endpoint: ProfitAndLossByTrackingCategory|ProfitAndLossByTrackingCategory]] | |||
:[[Xero Accounting Endpoint: ProfitAndLossByTrackingOption|ProfitAndLossByTrackingOption]] | |||
:[[Xero Accounting Endpoint: ProfitAndLossMultiPeriodTable|ProfitAndLossMultiPeriodTable]] | |||
:[[Xero Accounting Endpoint: ProfitAndLossTable|ProfitAndLossTable]] | |||
== Related Topics == | |||
:[[Xero Accounting Models]] | |||
:[[Xero Accounting Endpoints]] | |||
Latest revision as of 20:01, 16 May 2023
Disclaimer
The ProfitAndLossMultiPeriodTable is the recommend endpoint for building Profit and Loss reports. We recommend using it over the ProfitAndLossByMonth endpoint.
Overview
The Xero ProfitAndLossByMonth endpoint provides net movement values for 12-months of a given financial year.
It is a function that accepts a series of parameters.
You may also use the ProfitAndLoss which provides a similar data set but for a given date range.
Parameters
The ProfitAndLossByMonth endpoint is a function that accepts the following parameters.
- FinancialYear
- A whole number field that determines the financial year for which to produce values.
- If omitted, it will use the current financial year.
- PaymentsOnly
- A true/false field that determines if only payments are included.
- If omitted, it will be set to False.
- StandardLayout
- A true/false field that determines if the values are produced only for accounts that are in the accounts endpoint.
- If omitted, it will be set to True.
Fields
The following fields are available for the ProfitAndLossByMonth endpoint.
- FinancialYear
- A whole number field that indicates the financial year for which the values are produced.
- This will match the FinancialYear entered as parameter.
- PaymentsOnly
- A true/false field that indicates if only payments are included.
- This will match the PaymentsOnly entered as parameter.
- StandardLayout
- A true/false field that indicates if values are produced only for accounts that are in the accounts endpoint.
- This will match the StandardLayout entered as parameter.
- UpdatedDateUTC
- A date time field that indicates when the data was calculated.
- Lines
- A table field that provides the list of values.
- See Lines Fields for more information.
Lines Fields
The Lines Fields include the following sub fields.
- LineType
- A text field that indicates the type of line.
- Possible values are:
- Header: Indicates the row contains a header.
- Detail: Indicates the row contains the value of a given account.
- Total: Indicates the row contains a calculated value.
- AccountID
- A GUID field that provides the id of the account.
- This field can be used to link to the Accounts endpoints.
- This field will be set to null for rows whose LineType is not set to Detail.
- AccountName
- A text field that provides the account name or the name of a header or total.
- AccountLineType
- A text field that provides the a descriptive field to indicate the type of account or row.
- Amounts
- A table field that provides the list of all amounts for each month.
- See Amounts Fields for more information.
Amounts Fields
The Amounts Fields includes the following sub-fields.
- Date
- A date field that provides the month as a date.
- Amount
- A decimal field that provides the value for the row.
Known Issue
There is a known bug in the Xero API which incorrectly calculates values if your financial year ends in a month without 31 days (e.g. Australian Businesses). To work around this issue, OdataLink will call the endpoint twice for affected businesses. This does not apply to all regions. For instance, New Zealand data files are mostly unaffected as their financial year already ends on a month with 31 days.
Xero API
For a detailed run through of the endpoint, you can see the Xero API.
Related Fields
- None
Related Endpoints
- Accounts
- ProfitAndLoss
- ProfitAndLossAdvanced
- ProfitAndLossByTrackingCategory
- ProfitAndLossByTrackingOption
- ProfitAndLossMultiPeriodTable
- ProfitAndLossTable