Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetReportProfitAndLossAsync Return Null JSON #502

Closed
TechJarr opened this issue Feb 2, 2024 · 7 comments
Closed

GetReportProfitAndLossAsync Return Null JSON #502

TechJarr opened this issue Feb 2, 2024 · 7 comments

Comments

@TechJarr
Copy link

TechJarr commented Feb 2, 2024

When using the GetReportProfitAndLossAsync function to receive the JSON response, we received a status code of 200. However, upon deserializing the JSON to text, we discovered that there was no data present in the JSON. Additionally, we checked the History log in the Xero developer platform and found no record of this call.

Sample null json:
[
{
"Filtered": true,
"TrackingCategoryId": "xxx",
"ReportData": null
},
{
"Filtered": false,
"TrackingCategoryId": null,
"ReportData": null
}
]

Copy link

github-actions bot commented Feb 2, 2024

PETOSS-390

Copy link

github-actions bot commented Feb 2, 2024

Thanks for raising an issue, a ticket has been created to track your request

@thomas-anu
Copy link
Contributor

Hi @TechJarr Can you please provide the details of the SDK version that you are using? We have tested the method with latest SDK and could not reproduce the issue. Can you give details on any additional parameters if you have used?

@TechJarr
Copy link
Author

Hi @thomas-anu

Our SDK version is as follows:
"XeroDataExtraction/1.0.0": {
"dependencies": {
"Xero.NetStandard.OAuth2": "3.34.5",
"Xero.NetStandard.OAuth2Client": "1.6.0"
},

From our code base, below are the parameters used for getting P&L data:
apiInstance.GetReportProfitAndLossAsync(accessToken, task.TenantId, t.FromDate, t.ToDate, t.Periods, t.Timeframe, t.TrackingCategoryID1, t.TrackingCategoryID2, t.TrackingOptionID1, t.TrackingOptionID2);

Many thanks!

@thomas-anu
Copy link
Contributor

thomas-anu commented Feb 19, 2024

Hi @TechJarr , can you please check the Xero dashboard with the same filters and the API explorer to check what data is being returned? We are still not able to reproduce the issue. Please find the screenshots attached.

To check on Xero dashboard, navigate to Accounting --> Profit and Loss
To check using API explorer, https://api-explorer.xero.com/

Screenshot 2024-02-19 at 15 14 17 Can you please share with screenshots or further information on the same? (Mask the data if there are any sensitive information in it.)

Also the sample Json data that you have mentioned is different from the Json response from the SDK and API.
Screenshot 2024-02-19 at 15 14 48

Can you please give more information on it?

@TechJarr
Copy link
Author

Thanks @thomas-anu

After testing the API explorer, it returned a normal JSON response. However, when switching to send a request using the SDK, it produced a null JSON response. The sample JSON data is different from the normal response, indicating that this is one of its behaviors. I checked with the Xero Developer Platform, and although the server did not record the JSON call, it did produce a response similar to the one shown in the image you provided.

image

Let me know if there's anything else I can help you with!

@ankushkhandare95
Copy link
Contributor

Hi @TechJarr,

Apologies for the inconvenience caused.

We tried reproducing the same issue, called GetReportProfitAndLossAsync() with "Xero.NetStandard.OAuth2": "3.34.5" as specified by you, however we were getting valid report data with success response. Can you please verify the parameters/filters you are using on API explorer and developer dashboard match with your GetReportProfitAndLossAsync() method arguments. If you face the same issue post verifying it, give us some more idea about the filters you are using to call GetReportProfitAndLossAsync()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants