Coder Social home page Coder Social logo

Comments (20)

jonathanleather avatar jonathanleather commented on August 14, 2024

Hi @mathiasbanda
We aren't aware of any issues with the environment. I have just tested the endpoints in ET and they are working as expected.

Can you provide more information into the requests your are sending?

Cheers
Jon

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Hi Jon,

My request looks like this:

string uri = "https://test-api.service.hmrc.gov.uk/" + "vat/666541835/obligations"
HttpWebRequest oHTTPRequest = (HttpWebRequest)WebRequest.Create(uri);
oHTTPRequest.Accept = "application/vnd.hmrc.1.0+json";
oHTTPRequest.ContentType = "application/json";
oHTTPRequest.Method = "GET";
return oHTTPRequest;

It's passing the authentication but the line that simply crashes is this:

WebResponse Response = await Request.GetResponseAsync();

So as I have no idea what the period keys are I decided to post a vat return using the sample data in the example trying both "#1" or "001" as key. Both return SERVER_ERROR : Service unavailable

My user id is: 351196716964

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

From looking at the logs it appears you have been able to get in within the past 15 mins or so?
And you are now receiving a 400? if that's not the case let me know and we can have another look for you.

Within regards to period keys have a look at this closed issue for more info #80.

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Hi @jonathanleather
Is this in relation to getting obligations or posting vat?

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

@mathiasbanda The period key information is for when you are using the submit vat return/ Get vat return endpoints.

The logs are showing that you are hitting the obligations endpoint.

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Cheers Jon

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Hi I am back Jonathan, could you please have a look for me and if possible tell me what I could be doing wrong. When I trap the response from the server this is what my error handler says: "The remote server returned an error: (500) Internal Server Error."

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

My understanding is the server is throwing an exception

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

Hi @mathiasbanda
Did you manage to resolve this?
I have checked the environment this morning and it is working fine.

If you are still having issues I suggest doing the following.

  • First, I would create a brand new test user
  • Have a look over the Submit Vat Return request in the documentation
  • Then using Postman (or similar tool) build up the request (There are screenshots on issue #81 that display how to set this request up using postman)

Let me know how you get on.

Cheers
Jon

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Thanks Jon,

I will try that. In meantime I would like confirmation our account is properly whitelisted. There was a communication a few a months ago to redo something if an application hadn't been access for more than 60 days. I was engrossed in other projects at the time so I noted it but can no longer find the email now and it will be great to clear that one

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

@mathiasbanda
I'll happily check your white listing for you, but I would need the original white listing ID to compare with what we have. I wouldn't advise posting that on here mind you.

The best way is if you email SDST ([email protected]) with whatever details you have, mentioning that you have already spoken to us via this channel. This will then get forwarded to us to check for you.

Cheers
Jon

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

We are following that thanks again. One more request

It would be very helpful to have just one valid VAT obligation id / key for this this vrn please: 666108172

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

@mathiasbanda

Unfortunately we are unable to set up individual responses for specific VRNs for this endpoint.
There is already a story in the pipeline to revisit the responses for the VAT Obligations endpoint which will be played in a future sprint.

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Cool

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

I am still getting server error 500. My get obligations request with query string looks like this:
https://test-api.service.hmrc.gov.uk/vat/666108172/obligations?from=2018-01-01&to=2018-04-30&status=A
Am I missing something anyone please?

from vat-api.

jonathanleather avatar jonathanleather commented on August 14, 2024

Hi @mathiasbanda

The date range for obligations needs to be over 6 months and less than year.

For example this will work:
https://test-api.service.hmrc.gov.uk/vat/666108172/obligations?from=2018-01-01&to=2018-07-30&status=A

Apologies for the inconvenience for this, we are looking to improve the canned responses for this endpoint.

Cheers
Jon

from vat-api.

mathiasbanda avatar mathiasbanda commented on August 14, 2024

Thanks - that works great

from vat-api.

hamzaayz avatar hamzaayz commented on August 14, 2024

Hi,
anyone, please help im getting service unavailable when im trying to submit vat return using the following
https://test-api.service.hmrc.gov.uk/organisations/vat/517587125/returns
{
"code": "SERVER_ERROR",
"message": "Service unavailable"
}
heres my json
{
"periodKey": "A001",
"vatDueSales": 105.50,
"vatDueAcquisitions": -100.45,
"totalVatDue": 5.05,
"vatReclaimedCurrPeriod": 105.15,
"netVatDue": 100.10,
"totalValueSalesExVAT": 300,
"totalValuePurchasesExVAT": 300,
"totalValueGoodsSuppliedExVAT": 3000,
"totalAcquisitionsExVAT": 3000,
"finalised": true
}

from vat-api.

mtd-api-team avatar mtd-api-team commented on August 14, 2024

Hello,

Your payload looks ok so could you provide the request headers you are submitting for content-type and accept? We may need that information to figure out what we are seeing on our end.

Regards

from vat-api.

hamzaayz avatar hamzaayz commented on August 14, 2024

from vat-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.