Verb Usage

 

As there is a debate about the standard usage of http verbs, the ITAS API has been generalised to use a set of standard verbs, common to many API platforms and attaches the focus on the purpose of the end point:

 

  • GET (Read) - reads data from ITAS as a single object e.g. Physical Contract or Client Account.
  • GET (List) - reads an array of data, i.e. multiple objects from the ITAS database.
  • POST - creates new records in ITAS where ITAS determines and returns the ID e.g. a PayableOnAccount generic cash payment.
  • PUT - creates or updates an object in ITAS where the ID is determined by the requester e.g. ClientAccount.
  • PATCH - updates an object in ITAS with partial data; i.e. not all mandatory fields are sent in the request.
  • DELETE - removes records from ITAS

 

Important note regarding PUT requests: when records are updated via a PUT request, blank values are taken in face value and will overwrite data. For example, to change the status of a chr20 records, a PUT request would be made to the http://itas.apiary.io/ReferenceData/TradingEntityId/ClientLedger/ClientAccounts/ClientAccountId endpoint. If the request included the following data

 

Both the Status and the AddressLine1 values would be set as expected. However if the following values were sent

Address would be overwritten with a blank value. So blank values are not written by mistake. All values intended for update should be included in PUT requests, for example

In this scenario where the field is mandatory, the current value should be looked up first with a GET request and included in the PUT request.


Was this helpful?
Thanks for your feedback

Recently viewed