Rest API - Booking endpoint issues  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Rest API - Booking endpoint issues

Postby JiwaNewb » Thu Sep 12, 2019 11:35 am

Hi all,

Currently trying to get BookIns working but having some troubles.

Current issues:
    1. Duplicate lines being created
    2. Can't seem to get LineDetail to work

My current process is (all stateless)
    1. Create a shipment in Jiwa
    2. Commit shipment for booking
    3. Create a BookIn using /BookIns/FromShipmentNo
    4. Based on the response from /BookIns/FromShipmentNo
    a) Update the JSON/Lines/Quantity fields
    b) Add a line details entry to JSON/Lines/LineDetails
    6. Patch the shipment using the updated data from 4. using /BookIns/{BookInID} patch endpoint

This will result in the lines being updated but the original lines are duplicated.

It will also ignore the contents of JSON/Lines/LineDetails and just create a dummy value based on JSON/Lines/Quantity.
This is an issue because I am passing Expiry and Batch/Serials through JSON/Lines/LineDetails.


If I update the lines via the /BookIns/{BookInID}/Lines/{LineID} patch endpoint, there are no duplicates created but JSON/Lines/LineDetails are still ignored.
I would also like to avoid this and do it via a single BookIn patch request if possible.

I have attached a sample /BookIns/{BookInID} patch request.
I have tried updating all the JSON/Lines/Quantity* fields with appropriate in/left/allocated fields and fully populated JSON/Lines/LineDetails nodes but they didn't seem to have any affect, so I have left them out of my example.
Attachments
BookInAfterPatch.PNG
BookIn lines after patch request
BookInAfterFromShipmentNo.PNG
BookIn lines after /BookIns/FromShipmentNo
Bookin.Patch.txt
Patch request
(13.16 KiB) Downloaded 64 times
JiwaNewb
I'm new here
I'm new here
 
Posts: 5
Joined: Thu Sep 05, 2019 4:35 pm

Re: Rest API - Booking endpoint issues

Postby Mike.Sheen » Mon Sep 16, 2019 11:20 am

I'll look into this - but before I go investing time testing the scenarios you outlined - can you tell me what version of Jiwa you are having these issues with?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Rest API - Booking endpoint issues

Postby JiwaNewb » Mon Sep 16, 2019 2:22 pm

Hi Mike,

Thanks, this was in version 7.2.1.0 using the Demo database as a base
JiwaNewb
I'm new here
I'm new here
 
Posts: 5
Joined: Thu Sep 05, 2019 4:35 pm

Re: Rest API - Booking endpoint issues  Topic is solved

Postby Mike.Sheen » Sun Sep 22, 2019 1:44 pm

Hi JiwaNewb,

Sorry about the slow reply (it's been a busy week!) - and thanks for your detailed and clear steps to repro - this made my life much easier.

The bad news, I'm afraid, is this is just a dumb bug - I've logged it as DEV-7804 to be fixed in the next SR.

You can track our progress on the next SR with this query - when there's none left then we're pretty much done.

Hopefully we'll get that done this week.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Rest API - Booking endpoint issues

Postby JiwaNewb » Mon Sep 23, 2019 11:09 am

Thanks Mike.

Fellow developers know finding bugs can be painful with no detail, happy to help.

I will follow the release
JiwaNewb
I'm new here
I'm new here
 
Posts: 5
Joined: Thu Sep 05, 2019 4:35 pm


Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest

cron