Coder Social home page Coder Social logo

ac000 / libmtdac Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 483 KB

A C library providing an interface to the UK's HMRC Make Tax Digital API

License: GNU Lesser General Public License v2.1

Makefile 2.35% C 96.68% Shell 0.98%
c api-client uk hmrc tax mtd vat linux freebsd

libmtdac's People

Contributors

ac000 avatar lgtm-migrator avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

libmtdac's Issues

Timestamp responses

It may be useful to add a datestamp to the JSON replies.

Main things to decide are the format and UTC or localtime.

sa: Endpoint deprecations

As according to here

From 30 November 2021 the following endpoints will be deprecated:

  • Submit self employment end of period statement
  • Submit UK property end of period statement

Above two are replaced with individuals-business-eops-api
individuals-business-eops-api implemented by 12c23c3

  • Get a UK property business

Already been deprecated and handled in libmtdac by 215cffa

  • Retrieve all UK property business obligations
  • Retrieve End of Period Statement Obligations for a UK Property Business

Above two are replaced by the obligations-api
obligations api added to libmtdac by bda805a

  • Intent to crystallise
  • Crystallisation

Above two are replaced by the individual-calculations-api
Crystallisation functions added to the obligations api in libmtdac by 95d2071

Namespace the mtd_ic_* functions to mtd_ic_sa_*

We also now (at least seem to be in the process) have crystalisation endpoints in here. IIRC I read somewhere HMRC are in the process of mocing various endpoints out of the Self-Assessment API into their own endpoint APIs (indeed this has already happened with at least BISS)

Should the device UUID actually be per device?

There seems to be some confusion as to whether the device UUID which is described as

An identifier unique to the originating device.

  • You need to generate a universally unique identifier (UUID), also
    known as a globally unique identifier (GUID), to use as a device ID

  • This should be generated by an application and persistently stored on
    the device. You can store the device ID in a hidden file, the Windows
    registry, or in a cookie.

  • The identifier should not expire

    If your end user deletes the device ID, you need to generate a new one.

should be per application or actually per device. As HMRC said this to me (when checking what fraud prevention headers I'm sending)

The value submitted for Gov-Client-Device-ID was the same for the 'mtd-cli' requests as it was for the 'itsa' requests. Can you please explain why this is the case?

Now they would normally be different but it seems I currently have tham as the same, probably from doing some testing/config stuff.

But perhaps they really should be the same. Waiting to hear back from them.

Make the credentials per API

In my latest dealings with HMRC in trying to get production credentials for itsa & mtd-cli, it was noted mtd-cli may be more tricky as it support both the ITSA and VAT APIs.

We can perhaps make this is a little easier by splitting mtd-cli into two virtual parts within HMRC, say mtd-cli-itsa & mtd-cli-vat where each can have its own credentials.

This would require doing something similar to commit 1b4f55b ("mtd: Introduce per API authorisation scope namespace") but for the client_id & client_secret .

fph: Check format of timestamp sent for Gov-Client-Local-IPs-Timestamp

While testing the Fraud Prevention Headers feedback endpoint, it is showing the following

{
       "header": "gov-client-local-ips-timestamp",
       "value": "2021-07-16T16:01:34.79Z",
       "code": "POTENTIALLY_INVALID_HEADER",
       "errors": [],
       "warnings": [
               "Value must be a UTC timestamp including milliseconds"
       ]
},

Using the validate endpoint doesn't show any problem with this, e.g sending

Gov-Client-Local-IPs-Timestamp: 2021-08-03T17:08:14.193Z

does not produce any warning.

Need to investigate what exactly is going on here.

saac: Seems to be missing support for a few endpoints

https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-accounts-api/1.0

We currently have support for

/accounts/self-assessment/{nino}/payments/{paymentId}
/accounts/self-assessment/{nino}/payments
/accounts/self-assessment/{nino}/charges/{transactionId}
/accounts/self-assessment/{nino}/charges
/accounts/self-assessment/{nino}/transactions/{transactionId}
/accounts/self-assessment/{nino}/transactions
/accounts/self-assessment/{nino}/balance

But we seem to be missing support for the 'Coding Out Underpayments and Debts' endpoints, I must have missed these being added...

/accounts/self-assessment/{nino}/{taxYear}/collection/tax-code

PUT & DELETE
/accounts/self-assessment/{nino}/{taxYear}/collection/tax-code

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.