Page 1 of 1

Web API and Debtor Systems

PostPosted: Mon Oct 28, 2019 9:44 pm
by SBarnes
Unless I've missed something am I correct in assuming Debtor Systems are not part of the Web API and it would need to be extended in a plugin to provide the functionality?

Re: Web API and Debtor Systems  Topic is solved

PostPosted: Wed Oct 30, 2019 5:04 pm
by Mike.Sheen
The management of the Debtor System Templates currently has no exposure by the standard API plugin, and the business logic for the Debtor System Templates currently has no implementation of the IJiwaDTOSerialisable or IJiwaDTODeserialisable interfaces - so you'd have to define a DTO and write the chunk of code to process the DTO and set / get the properties of the business logic accordingly - it's fairly straightforward stuff but would be better if we bake it in standard.

The management of Debtor Systems for a debtor is possible via the debtor routes - and including the debtor system information in the DTO for the debtor... so currently with the standard plugin:

  • GET /Debtors/{DebtorID} will return the debtor system information within the DTO
  • POST /Debtors will allow you to provide debtor system information when creating a debtor
  • PATCH /Debtors will allow you to add new debtor systems to a debtor, or modify existing debtor systems for a debtor

What's missing is a way to delete a debtor system from a debtor, or discrete routes for operating on debtor systems for a debtor.

One could add the routes to manage specifically the debtor system information for a specific debtor - much like Contact names - /Debtors/{DebtorID}/ContactNames/{ContactNameID} - it would be pretty close to a copy of that for debtor systems.

We should probably expand our standard plugin so the API does what is needed - so improvements DEV-7871 and DEV-7872 added.