Profit and Loss Raw time series data for a specified period with Xero APIs - xero-api

I want to get the raw time series data for all the charts for Profit and Loss and Balance Sheet. I went through the API documentation and could only find report/summary data for P&L and BS. Is there a way I can fetch all the data for all the charts/categories.
For example: If I request the ProfitAndLoss data then I should get the data shown below in json format.

https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2020-08-01&toDate=2021-07-31&periods=11&timeframe=MONTH
should return JSON that gets what you want.
From Xero ProfitAndLoss endpoint docs
Edit to modify API query:
Should be:
https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2021-08-01&toDate=2021-08-31&periods=11&timeframe=MONTH
Xero has quirky way to retrieve data. The modified query basically says get Aug 2021 and compare it to the previous 11 monthly periods eg all the way back to Sep 2020. This is the way the Xero UI reporting works too. The result is a table with columns for Aug 2021, Jul 2021, Jun 2021, May 2021, Apr 2021, Mar 2021, Feb 2021, Jan 2021, Dec 2020, Nov 2020, Oct 2020, Sep 2020, and rows for each account values by month.
Also note that you should choose a month with 31 days as the first month to compare to, else another Xero quirk will truncate all compared periods to how ever many days your start month has eg 30 days if you choose Sep to start.
The first query retrieves a not quite cumulative, read forward result, which to my mind is not useful at all.

Related

Data loss after billing changed in bigquery

In firebase I have data till date i.e, 17th of Aug 2022 however when I was querying in SQL workspace in bigquery I was getting data till 8th of Aug . My billing was reactivated on 17th ,now I am getting all data except 9th to 11th. Why there is data loss and is there any specific interval for the same .What could be the possible reason .

BigQuery UI - How to schedule a query to run on the last day of the month?

I have a query that pulls a summary of metrics for the past month that needs to run on the last day of each month at a set time.
The BigQuery 'Schedule query' UI allows you to choose a date and time to run a query each month but there is no apparent option to choose that last day of the month.
If I simply choose the 31st of the month, what happens if there are only 30-days in that month? Will the query still run?
Or do I have to schedule a query to run on the 27th, 28th, 29th, 30th, 31st of the month to make sure that I don't miss the correct date?
I can't find any mention of this situation in the BigQuery documentation or online so any help/suggestions will be very gratefully received.
I understand that you need to run your query in the last day of each month. However, if you set 31st of the month as the schedule options, it will skip the months which do not have 31 days.
You can check this affirmation, by performing the following test in the BigQuery UI:
In the Schedule query options, under Schedule options, set:
Repeats: Monthly
On the: 31
Start date and run time: set the date to 10th of June (which is a month with 30 days)
Click Schedule
On the left side of the BigQuery UI, click on Scheduled queries
Check the query you saved. Among other details, it should be displayed Next Scheduled.
It will be shown July, 31
As you can see, it skipped the 30th of June. Thus, when you configure your query to run on the 31st of each month, it will ignore the months with less than 31 days. For this reason, I would advise you to select 27th, 28th, 29th, 30th, 31st of each month in order to run it in a manner that suits you.
As a bonus information, you can set up a Custom schedule option, as mentioned here. You can use syntaxes as "1st monday of month 00:00" or "every monday 00:00", here.

Rolling months data by year_month in obiee

I just need to how to create Rolling months in Obiee. If I click for jan 2017,it should show datas from feb 2016.For past previous 12 Months it should show.
You will need a properly configured time dimension. As soon as you have that all the time series functionalities are at your disposal and will work immediately.
https://gerardnico.com/wiki/dat/obiee/obis/time_dimension
https://gerardnico.com/wiki/dat/obiee/obis/logical_sql/function_time

Bigcommerce Product API update preorder_release_date

What is the proper syntax for updating a product's pre-order release date through the API?
I've tried it this way:
{"preorder_release_date":"Wed, 05 Oct 2016 05:00:00 +0000"}
And while that passes through validation, all it ends up doing is clearing out whatever value was formerly in the field without actually setting it to the correct date.

Jawbone API results not as expected

I am querying Jawbone API for up with following HTTP request :
https://jawbone.com/nudge/api/v.1.0/users/#me/moves?start_time=1368392836&end_time=1399928836
I started using UP24 in March, 2014 and with above request, I get data for March and April (till April 18, 2014) but not after that. The data is continuously synced with the app by my UP24 device which I can also see on the app. I am not sure why I am not getting data after April 18, 2014.
The epoch start time stamp corresponds to Sun, 12 May 2013 21:07:16 GMT
The epoch end time stamp corresponds to Mon, 12 May 2014 21:07:16 GMT
The results are paginated and the next link is supplied at end of each response to get the next data