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

Testing Sandbox Appears to Ignore Query Parameters when Getting Obligations #890

Closed
1 of 2 tasks
leoriviera opened this issue Feb 18, 2022 · 2 comments
Closed
1 of 2 tasks

Comments

@leoriviera
Copy link

Bug report

You must read the information below before you submit a bug report.

The MTD API team cannot help if your bug report is about:

  • Fraud Prevention Headers
  • Issues relating to OAuth2
  • Subscribing or registering to use the API Platform, MTD enrolment, de-enrolment, registration for VAT, Beta services, etc.
  • Issues integrating with the API Platform (e.g. setting up an application/access)
  • Code examples in a given programming language
  • Business-related questions or processes pre MTD
  • Scheduled maintenance windows and days
  • Onboarding (e.g. registering, obtaining keys)
  • Performance metrics

For any of the above, you must contact the Software Developer Support Team directly at SDSTeam@hmrc.gov.uk. The SDS Team do not monitor this repository.

This repository is for bug reports relating to VAT API code in this repository only.

Fill in the sections below to submit your bug report:

  • Documentation
  • API

Describe the bug
A clear and concise description of what the bug is.

The endpoint used to get obligations appears to ignore the from, to and status parameters when in the testing sandbox.

To Reproduce
Steps to reproduce the behavior:

Making a request to /organisations/vat/{vrn}/obligations?from=2017-01-01&to=2017-03-31&status=F returns the following.

[
  {
    periodKey: '18A1',
    start: '2017-01-01',
    end: '2017-03-31',
    due: '2017-05-07',
    status: 'F',
    received: '2017-05-06'
  },
  {
    periodKey: '18A2',
    start: '2017-04-01',
    end: '2017-06-30',
    due: '2017-08-07',
    status: 'O'
  }
]

Expected behavior
A clear and concise description of what you expected to happen.

It's expected that

  • only obligations between from and to will be returned
  • only fulfilled obligations will be returned, with no open obligations

This means the result from the API would look like

[
  {
    periodKey: '18A1',
    start: '2017-01-01',
    end: '2017-03-31',
    due: '2017-05-07',
    status: 'F',
    received: '2017-05-06'
  }
]

Screenshots / Requests / Responses
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@DDCTLS-DEV-TEAM
Copy link

Hello @leoriviera

Apologies we haven't gotten back to you on this one. The external test environment uses stub data so it will only ever return the same data and dates.

We have checked production events and the call works as needed.

Thank you again.

@glenrobson
Copy link

It would be really useful if the sandbox respected the query parameters from and to. It is unclear from the documentation whether the matching on dates is inclusive of the start and end dates provided or if you need to take a day off the start and add one to the end to match the quarter date range.

I can see from your comment above you don't need to but finding the answer in a closed issue is not ideal.

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

4 participants