Repository navigation
Replies: 2 comments 1 reply
|
Hi,
However you should be able to do everything required. For example, to submit a cumulative period update, you would run something like $ mtd-cli seb cps-update <file> businessId taxYearWhere <file> is a JSON file with the format as described here.
Currently that is probably the best way. Using the endpoints[] array in libmtdac you can map the endpoint URL to an enum value that is used by the various endpoint files in mtd-cli. E.g. taking the above cumulative period update as an example We can see it has an endpoint URL of [MTD_API_EP_SEB_SECPS_AMEND] = {
.epstr = "MTD_API_EP_SEB_SECPS_AMEND",
.tmpl = "/individuals/business/self-employment/{nino}/{businessId}/cumulative/{taxYear}",
.method = M_PUT,
.ctype = CONTENT_TYPE_JSON,
.api = MTD_EP_API_SEB,
},Taking the enum value {
.name = "cps-update",
.api_ep = MTD_API_EP_SEB_SECPS_AMEND,
.nr_req_args = 3,
.file_data = true,
.args = "<file> businessId taxYear"
}, {So that shows the endpoint sub-command and required arguments. Near the top of the file is #define API sebThat's the name of the endpoint, so we end up with $ mtd-cli seb cps-update <file> businessId taxYearNow the idea would be to wrap this up in a shell script once you know all the bits you need for your use case. Oh and in case you didn't notice there is bash command completion support, simply |
|
Thanks for the detailed response, and apologies for not responding sooner. With the upcoming deadline for the first quarterly update for this financial year due soon, i'd like to figure out whether i'll be able to use mtd-cli or itsa. I'd prefer to use itsa if it's simpler, but the help from running no args doesn't seem to mention quarterly updates, and's also failing with It looks like quarterly updates are handled by the Cumulative Period Summary you mentioned above (i was a bit confused by this as the gov.uk documentation doesn't describe them as cumulative, but then i noticed that for the "Create a Self-Employment Period Summary" it says "Note: This endpoint can only be used for submissions for tax year 2024-25 or earlier. New endpoints which support cumulative submission will be provided for tax year 2025-26 onwards."). I need to find my businessID, and i've followed the procedure you describe above and end up with command: Do you have any idea what i'm doing wrong here? Thanks as always for any help. |
Uh oh!
There was an error while loading. Please reload this page.
Thanks for writing mtd-cli and libmtdac and making them available.
I thought it might be useful to other users of devuan-linux (and possibly debian) to have example commands to get started. In my case, for things like this i prefer using
LD_PRELOADto installing in/usr/, so:(On devuan,
DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socketseems to be required in order formtd-cli init itsato (i think) communicate with the web browser.)I struggled a little with what to do after this. What seemed to work is:
Follow instructions in libmtdac/README.rst
Register with HMRC.Run:
mtd-cli/src/mtd-cli init itsa.For
Enter your NINO, enter your National insurance number. I've subsequently read about this in the readme, but it confused me for a while.Enter test user user id/pasword.
It's probably me, but i got confused by this:
I didn't realise that i had to press ENTER first - i thought mtd-cli had tried and failed to open a web browser, so i opened the URL manually.
I'm not sure how i could use mtd-cli to actually create records and send quarterly updates etc. Is there any information about what mtd-cli commands to use? Or should i look at the gov.uk website's description of the REST API and attempt to map back to mtd-cli commands?
Thanks for any help and suggestions.
All reactions