Giter Club home page Giter Club logo

obligations-api's People

Contributors

abigail-houston-hmrc avatar basotia avatar betadraconis avatar chetan-jain-atos avatar darshanbala-hmrc avatar david-walters-hmrc avatar dreamcastknight avatar edjannoo avatar gauravjai avatar gazalnebhmrc avatar harrybaxter avatar hmrc-web-operations avatar jacobbrownlow avatar james-work-account avatar jeremystone avatar louisewong98 avatar mashukreza avatar mattstephens-hmrc avatar mbrookesy avatar molafisoye avatar nboaram avatar rachgibbons avatar rhysconnor avatar samueljacobshmrc avatar sean-flynn-hmrc avatar shreeya-hmrc avatar sudoku007 avatar taiwo-ab avatar thepworth95 avatar tom-lloyd-hmrc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obligations-api's Issues

Obligations:Period Key for VAT Submission Error response

Hi

I am passing the following via curl on the test api for VAT to submit a return:

$strURL = "https://test-api.service.hmrc.gov.uk/organisations/vat/{vrn}/obligations/?from=2021-01-01&to=2021-03-31&status=O&scope=write:vat"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $strURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 3); curl_setopt($ch, CURLOPT_HTTPGET, true); $varHeadersPeriodKey = array( "accept:application/vnd.hmrc.1.0+json", "authorization:Bearer abc123dohrayme" ); curl_setopt($ch, CURLOPT_HTTPHEADER, $varHeadersPeriodKey); $contentPeriodKey = trim(curl_exec($ch)); curl_close($ch);

however when my response comes back all i seem to be getting is:
{ "code": "INVALID_SCOPE", "message": "Can not access the required resource. Ensure this token has all the required scopes." }

I cant find anywhere the sample curl code that i should be using for this.
I have attempted to include the scope into above and i am using the same scope to retrieve the Token once the oAuth has granted me the code.

How do i go about retrieving the period key please.

Kind regards

M@

Request for self-employment obligations in /obligations/details/{nino}/end-of-period-statement

Can we have obligations output for a 'self-employment' business in the testing '/obligations/details/{nino}/end-of-period-statement' endpoint?

This would then match the '/obligations/details/{nino}/income-and-expenditure' endpoint as currently we just get

"obligations": [
                {
                    "typeOfBusiness": "uk-property",
                    "businessId": "XAIS12345678912",
                    "obligationDetails": [
                        {
                            "periodStartDate": "2018-04-06",
                            "periodEndDate": "2019-04-05",
                            "dueDate": "2020-01-31",
                            "status": "Open"
                        }
                    ]
                },
                {
                    "typeOfBusiness": "foreign-property",
                    "businessId": "XAIS12345678911",
                    "obligationDetails": [
                        {
                            "periodStartDate": "2021-04-06",
                            "periodEndDate": "2022-04-05",
                            "dueDate": "2023-01-31",
                            "status": "Open"
                        }
                    ]
                }
            ]

while the '/obligations/details/{nino}/income-and-expenditure' endpoint returns (in testing)

"obligations": [
                {
                    "typeOfBusiness": "self-employment",
                    "businessId": "XAIS12345678911",
                    "obligationDetails": [
                        {
                            "periodStartDate": "2018-04-06",
                            "periodEndDate": "2018-07-05",
                            "dueDate": "2018-08-05",
                            "receivedDate": "2018-08-01",
                            "status": "Fulfilled"
                        },
                        {
                            "periodStartDate": "2018-07-06",
                            "periodEndDate": "2018-10-05",
                            "dueDate": "2018-11-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2018-10-06",
                            "periodEndDate": "2019-01-05",
                            "dueDate": "2019-02-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2019-01-06",
                            "periodEndDate": "2019-04-05",
                            "dueDate": "2019-05-06",
                            "status": "Open"
                        }
                    ]
                },
                {
                    "typeOfBusiness": "uk-property",
                    "businessId": "XAIS12345678912",
                    "obligationDetails": [
                        {
                            "periodStartDate": "2018-04-06",
                            "periodEndDate": "2018-07-05",
                            "dueDate": "2018-08-05",
                            "receivedDate": "2018-08-01",
                            "status": "Fulfilled"
                        },
                        {
                            "periodStartDate": "2018-07-06",
                            "periodEndDate": "2018-10-05",
                            "dueDate": "2018-11-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2018-10-06",
                            "periodEndDate": "2019-01-05",
                            "dueDate": "2019-02-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2019-01-06",
                            "periodEndDate": "2019-04-05",
                            "dueDate": "2019-05-06",
                            "status": "Open"
                        }
                    ]
                },
                {
                    "typeOfBusiness": "foreign-property",
                    "businessId": "XAIS12345678911",
                    "obligationDetails": [
                        {
                            "periodStartDate": "2021-04-06",
                            "periodEndDate": "2021-07-05",
                            "dueDate": "2021-08-05",
                            "receivedDate": "2021-08-01",
                            "status": "Fulfilled"
                        },
                        {
                            "periodStartDate": "2021-07-06",
                            "periodEndDate": "2021-10-05",
                            "dueDate": "2021-11-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2021-10-06",
                            "periodEndDate": "2022-01-05",
                            "dueDate": "2022-02-05",
                            "status": "Open"
                        },
                        {
                            "periodStartDate": "2022-01-06",
                            "periodEndDate": "2022-04-05",
                            "dueDate": "2022-05-06",
                            "status": "Open"
                        }
                    ]
                }
            ]

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.