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

View VAT Return - PeriodKey format #49

Closed
boggey79 opened this issue Feb 13, 2018 · 6 comments
Closed

View VAT Return - PeriodKey format #49

boggey79 opened this issue Feb 13, 2018 · 6 comments

Comments

@boggey79
Copy link

The VAT Obligations endpoint returns a period key (e.g. #001) for each corresponding VAT return.

We then attempt to feed the period key into the View Vat Return endpoint as follows:

GET: /vat/{vrn}/returns/{periodKey}

If we feed in the example key (#001) and VRN we get the response:

MATCHING_RESOURCE_NOT_FOUND

Removing the # prefix then returns:

PERIOD_KEY_INVALID

We've attempted various permutations but to no avail. Please can someone advise on the correct form for this request and whether there's some specific values we need to be using to get a canned response back?

Thanks.

@jonathanleather
Copy link
Contributor

Hi @boggey79
The period key is just a string. It doesn't necessarily need to be #001 another possible scenario could be 13RL.
In the instance of using a #, it needs to be URL encoded. For example, using Postman you would need to convert /{vrn}/returns/#001 to /{vrn}/returns/%23001

In terms of canned responses - you will need to use the "Submit VAT return for period" endpoint first.
Then, using the same VRN and period key, use the "Get VAT Return" endpoint to retrieve the information you submitted.

Cheers
Jon

@boggey79
Copy link
Author

Excellent, thank you for the clarification.

@pp07
Copy link

pp07 commented Nov 3, 2018

How to create period key, I means what parameters are used to create period key

example
18A1 is period key which use frequently in tutorials of HMRC for vat return, what is mean of it? please guide.

@adamdavi3s
Copy link

The period key is not generated by you.
It is generated by HMRC and returned by the obligations API.
The documentation clearly explains

@pp07
Copy link

pp07 commented Nov 3, 2018

@adamdavi3s

As per documentation for Vat return submit process we should enter Period key as parameter for calling Vat Return submit api......

So my question is which value pass that filed or that parameter

please guide

@jonathanleather
Copy link
Contributor

Hi @pp07

I'm struggling to understand what the question is.
As @adamdavi3s has kindly mentioned, If you hit the Obligations API you will be returned a series of Obligations and their associated PeriodKeys.

You can then use one of the returned PeriodKeys from an open obligation to Submit your VAT Return.

To view the return following a submission, you must use the same periodKey that was previously submitted.

Cheers
Jon

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