SQL-Ledger GL routes according to OpenAPI specifications

by sweitmann, Thursday, July 20, 2023, 09:16 (282 days ago)

Hi Bohdan,

As announced in the Infoniqa IBP Team channel this week, Hashim is currently working on creating new SQL-Ledger API routes related to General Ledger transactions using existing SQL-Ledger modules and OpenAPI specifications.

This will include:
1.) Route to get all GL transactions
2.) Route to create a new GL transaction
3.) Route to update an existing GL transaction
4.) Rout go get one specific transaction

The first route is almost done and will be ready for very testing soon. Hashim will keep us updated and post any further information in regard to this here in the forum whenever available.

I would appreciate and be very grateful if you both could continue your discussions in regard to this project here in the forum, so that anyone who is interested can join in and follow the work.

All the best
Sebastian

SQL-Ledger GL routes according to OpenAPI specifications

by Hashim, Wednesday, August 16, 2023, 07:45 (255 days ago) @ sweitmann

As discussed before, these are the following updates that have been done so far based on feedback from Bohdan.:


1. Route names have been changed to follow the structure /gl/transaction.

2. Line data has been changed to use camelcase.

3. GL Transaction and GL transaction line components have been created, and all routes now should follow these for a structured and standard output. We can also discuss these components further to see if we need add anything that's missing.

4. Error handling for post has been added and we should be getting appropriate error codes with an JSON error response. In my testing, I got the appropriate error responses but some unexpected errors right now might still return a HTML response.

5. Error handling for the database not existing been added. This is a simple check right now but later we can update this same check for authentication as well.


All these changes are live and available on the swagger along with a test server for testing:
https://app.swaggerhub.com/apis/HASHIM1SAQIB/SqlLedgerRest/1

Looking forward any additional feedback needed and improving:)

SQL-Ledger GL routes according to OpenAPI specifications

by Hashim, Friday, September 22, 2023, 04:44 (219 days ago) @ Hashim

Update regarding development, where we are till now.

1. Route to update a transaction has been created. This is essentially the same as as the create route but if there is an "id" supplied in the route like post '/gl/transactions/{id}', it will be treated as an update request. The complete object GL object payload will be required. We are using post instead of put, since on the back end, the code for the route is also essentially the same/it wouldn't make much sense to create a separate route for this specially since the processing is almost identical to the create route. We can change this later if there's anything special required for the update route.

2. Route to delete a transaction has been added.

3. Filters for the get transactions route have been added. The filters available right now are startDate
endDate
description
notes
reference
accno
but this can be updated/have more added as needed.

4. Route definitions now follow:
api/client/{client} structure.

5. Testing URL has been updated to:
https://api.mnapk.com/api/client/ledger28

All of these changes are reflected in:
https://app.swaggerhub.com/apis/HASHIM1SAQIB/SqlLedgerRest/1

Link to repo:
https://github.com/HashimSaqib/Sql-Ledger-REST

SQL-Ledger GL routes according to OpenAPI specifications

by Hashim, Thursday, October 05, 2023, 06:36 (206 days ago) @ Hashim

Small update: Basic pagination has been configured for the "get /gl/transactions" route. This is based on 3 query parameters:
limit (default 20)
page (default 1)
sort (default DESC)
and uses timestamp as the column for pagination. These can be updated and changed as needed but the based functionality is working at this point. This can be tested in the swaggerhub set up with the test server.

https://app.swaggerhub.com/apis/HASHIM1SAQIB/SqlLedgerRest/1#/

RSS Feed of thread